[Ruby] [ANN] db_memcache_store plugin for Rails Sessions
Eric Hodel
drbrain at segment7.net
Sun Jan 21 16:55:15 PST 2007
On Jan 21, 2007, at 16:18, Geoffrey Grosenbach wrote:
> Traditionally, using memcached has been one of the fastest ways to
> store sessions. However, if you restart memcached, all your
> sessions will be erased and all your users will have to login again.
>
> I have heard that the Robot Coop uses a system where sessions are
> stored both in the database (for persistence) and in memcached (for
> easy access).
Unless things have changed, sessions don't touch the DB. Instead a
cookie has an encrypted copy with the information necessary to log in
a user should the session disappear. The apps are light on the
session (flash only, IIRC), so persistence isn't a problem.
> This library is an attempt to recreate that system. Sessions
> updates are saved to the database, but are also kept in memcached
> for quick access. If you turn off your memcached servers, the
> database will be used exclusively.
I hear that this is the way things are typically run for session-
heavy apps.
--
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
I LIT YOUR GEM ON FIRE!
More information about the Ruby
mailing list