|
@@ -102,7 +102,9 @@ class Cache extends MemcacheCompat {
|
102
|
102
|
// Wrapper for Memcache::add, with the zlib option removed and default duration of 30 days
|
103
|
103
|
public function add_value($Key, $Value, $Duration = 2592000) {
|
104
|
104
|
$StartTime = microtime(true);
|
105
|
|
- $Added = $this->add($Key, $Value, 0, $Duration);
|
|
105
|
+ $AddParams = [$Key, $Value, false, $Duration];
|
|
106
|
+ if (is_subclass_of($this, 'Memcached')) unset($AddParams[2]);
|
|
107
|
+ $Added = $this->add(...$AddParams);
|
106
|
108
|
$this->Time += (microtime(true) - $StartTime) * 1000;
|
107
|
109
|
return $Added;
|
108
|
110
|
}
|