#767: Replace sessions.py with something good
-------------------------+--------------------------------------------------
Reporter: fumanchu | Owner: fumanchu
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: sessions | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by guest):
As this sounds like a huge overhaul of Sessions is planned, i wanted to
make a suggestion: Many things, that those subclasses of
cherrypy.lib.sessions.Session do, are things that would fit perfectly in a
seperate interface. As many people are familiar with the python-memcached
API, i want to peopose a CacheInterface layer to provide just that.
The problem with MemcachedSession (and Session) is, that it does many
things that memcached already does, like taking care about expiration. In
the current state, whether a session is expired or not, is always tested
twice.
The file I attached is not meant as a patch, but as an proof-of-concept,
e.g. DatabaseCache is meant to make use of an abstraction-layer like
SqlAlchemy/Storm/etc (in this case I use a hand-crafted one).
I would be happy to hear any thoughts on this.