Skip to content

Commit 4dbe9d1

Browse files
committed
Merge pull request #106 from Geolim4/issue-105
Issue #105
2 parents e9fa7ac + 4674c17 commit 4dbe9d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

phpfastcache/3.0.0/drivers/xcache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ function driver_set($keyword, $value = "", $time = 300, $option = array() ) {
3131

3232
if(isset($option['skipExisting']) && $option['skipExisting'] == true) {
3333
if(!$this->isExisting($keyword)) {
34-
return xcache_set($keyword,$value,$time);
34+
return xcache_set($keyword,serialize($value),$time);
3535
}
3636
} else {
37-
return xcache_set($keyword,$value,$time);
37+
return xcache_set($keyword,serialize($value),$time);
3838
}
3939
return false;
4040
}
4141

4242
function driver_get($keyword, $option = array()) {
4343
// return null if no caching
4444
// return value if in caching
45-
$data = xcache_get($keyword);
45+
$data = unserialize(xcache_get($keyword));
4646
if($data === false || $data == "") {
4747
return null;
4848
}

0 commit comments

Comments
 (0)