Download & Extend

Patch for making session-memcache-db.inc work if memcache is not installed

Project:Memcache API and Integration
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

The following patch allows the session-memcache-db.inc file to still work, and defer to db, if memcache is not actually running.

Index: sites/all/modules/memcache/session-memcache-db.inc
===================================================================
--- sites/all/modules/memcache/session-memcache-db.inc (revision 429)
+++ sites/all/modules/memcache/session-memcache-db.inc (working copy)
@@ -29,7 +29,8 @@
   }

   // If user session is in memcache, use it, otherwise load from db.
-  $user = dmemcache_get($key, 'session');
+  if(function_exists('dmemcache_get'))
+    $user = dmemcache_get($key, 'session');
   if(!$user) {
   $user = db_fetch_object(db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = '%s'", $key));
   }

Comments

#1

Status:needs review» needs work

There does not seem to be a session-memcache-db.inc, so your patch can't apply... Marking as code needs work.

#2

Version:5.x-1.8» 5.x-1.x-dev

Updated to note that the session-memcache-db.inc file is only in CVS right now.

#3

Status:needs work» closed (won't fix)

Marking 5.x issues won't fix since that branch is no longer supported.