Index: engines/eacc.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cacherouter/engines/eacc.php,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 eacc.php
--- engines/eacc.php	26 Dec 2008 02:23:54 -0000	1.1.2.12
+++ engines/eacc.php	26 Dec 2008 07:11:26 -0000
@@ -26,16 +26,17 @@ class eaccCache extends Cache {
    *   Returns either the cache object or FALSE on failure
    */
   function get($key) {
-    $cache = parent::get($this->key($key));
+    $full_key = $this->key($key);
+    $cache = parent::get($full_key);
     if (isset($cache)) {
       return $cache;
     }
 
-    $cache = eaccelerator_get($this->key($key));
+    $cache = eaccelerator_get($full_key);
     if (!empty($cache)) {
       $cache = unserialize($cache);
     }
-    parent::set($this->key($key), $cache);
+    parent::set($full_key, $cache);
     return $cache;
   }
 
@@ -55,8 +56,9 @@ class eaccCache extends Cache {
    *   Returns TRUE on success or FALSE on failure
    */
   function set($key, $value, $expire = CACHE_PERMANENT, $headers = NULL) {
+    $ttl = $expire;
     if ($expire == CACHE_TEMPORARY) {
-      $expire = 180;
+      $ttl = 180;
     }
     // Create new cache object.
     $cache = new stdClass;
@@ -77,17 +79,18 @@ class eaccCache extends Cache {
         $lookup = array();
       }
 
-      // Set key to 1 so we can keep track of the bin
-      $lookup[$this->key($key)] = 1;
+      $full_key = $this->key($key);
+      // Set key to $expire so we can keep track of the bin
+      $lookup[$full_key] = $expire;
 
       // Attempt to store full key and value
-      if (!eaccelerator_put($this->key($key), serialize($cache), $expire)) {
-        unset($lookup[$this->key($key)]);
+      if (!eaccelerator_put($full_key, serialize($cache), $ttl)) {
+        unset($lookup[$full_key]);
         $return = FALSE;
       }
       else {
         // Update static cache
-        parent::set($this->key($key), $cache);
+        parent::set($full_key, $cache);
         $return = TRUE;
       }
 
