]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/cache.php
Cache fixes:
[quix0rs-gnu-social.git] / lib / cache.php
index 85e8badc174313ca3b735199f24290a1fc571294..b7b34c050043ba7d5257722bc77dfae9f39073d1 100644 (file)
@@ -120,7 +120,7 @@ class Cache
 
         if (Event::handle('StartCacheGet', array(&$key, &$value))) {
             if (array_key_exists($key, $this->_items)) {
-                $value = $this->_items[$key];
+                $value = unserialize($this->_items[$key]);
             }
             Event::handle('EndCacheGet', array($key, &$value));
         }
@@ -146,7 +146,7 @@ class Cache
         if (Event::handle('StartCacheSet', array(&$key, &$value, &$flag,
                                                  &$expiry, &$success))) {
 
-            $this->_items[$key] = $value;
+            $this->_items[$key] = serialize($value);
 
             $success = true;