Skip to content

MemcachedSessionStore #6

wants to merge 10 commits into from

2 participants



I've started working on a MemcachedSessionStore for smisk as an alternative to the FileSessionStore that can be shared by multiple instances of smisk, not running on the same machine.

Note that this is not ready to be pulled into the master repo, but I just wanted to give you a heads up and possibly get some input.

The commit concerning the uid generation uid.c can be ignored - for some reason I get a buffer overflow when running sha1_final() on my Mac OS system. I haven't put any effort into fixing this, and so just replaced it with a silly "id generation". I can give you more details on this if you wish!

Right now what remains is:

  • See if there's a nicer way to run refresh() without fetching the session from the memcached server, maybe an API change that passes data to the refresh() function as is done for write().
  • Make this an optional SessionStore - right now I've hardcoded it - just like was done for FileSessionStore previously. Any pointers on how this should be done?
  • Garbage collection code
  • Check INCREF/DECREF in the code - this is my first take with the Python C API so I've been pretty sloppy with the reference counting
  • Make sure that memcached_string is read from a config parameter

Oh, and to be able to deploy this in production I've based it on the v1.1.6 tag, but it should be easily merged into master.


rsms commented May 16, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.