Is there a clever way to dynamically mount either file depending on whether or not the memcache server is currently running?

If I kill and/or restart the memcache server, or just don't have one running for some period of time, all user login features on my site are dead in the water so long as I am using the memcache-session.inc. In lieu of having one session.inc file that supports memcache or database sessions, I figure that just mounting one or the other would be an easy solution?

Comments

ilmaestro’s picture

For now, I've just merged the old database session logic with the memcache-session logic and am falling back on the database session logic when dmemcache_object() === false. Let me know if this is a bad idea.

robertdouglass’s picture

Status: Active » Fixed

Please share your merged code. Also, did you do any benchmarking? Does this approach actually speed things up?

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.