Browse Source

Merge pull request #8408 from SmiSoft/master

XCache serialized
Mark Story 10 years ago
parent
commit
127a75a70a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Cache/Engine/XcacheEngine.php

+ 2 - 2
src/Cache/Engine/XcacheEngine.php

@@ -80,7 +80,7 @@ class XcacheEngine extends CacheEngine
         $duration = $this->_config['duration'];
         $expires = time() + $duration;
         xcache_set($key . '_expires', $expires, $duration);
-        return xcache_set($key, $value, $duration);
+        return xcache_set($key, serialize($value), $duration);
     }
 
     /**
@@ -100,7 +100,7 @@ class XcacheEngine extends CacheEngine
             if ($cachetime < $time || ($time + $this->_config['duration']) < $cachetime) {
                 return false;
             }
-            return xcache_get($key);
+            return unserialize(xcache_get($key));
         }
         return false;
     }