修正memcached缓存驱动的有效期

This commit is contained in:
thinkphp
2016-03-09 17:22:19 +08:00
parent 1a56bee3f3
commit 22989a5316

View File

@@ -85,6 +85,7 @@ class Memcached
$expire = $this->options['expire']; $expire = $this->options['expire'];
} }
$name = $this->options['prefix'] . $name; $name = $this->options['prefix'] . $name;
$expire = 0 == $expire ? 0 : time() + $expire;
if ($this->handler->set($name, $value, $expire)) { if ($this->handler->set($name, $value, $expire)) {
if ($this->options['length'] > 0) { if ($this->options['length'] > 0) {
// 记录缓存队列 // 记录缓存队列