cacheTtl fix
This commit is contained in:
parent
787f06a314
commit
d814943168
@ -38,7 +38,7 @@ trait ArrayCacheTrait
|
||||
if (!isset($this->ttlValues[$key])) {
|
||||
return $default;
|
||||
}
|
||||
$this->ttlValues[$key] = \strtotime($this->ttl);
|
||||
$this->ttlValues[$key] = time() + $this->ttl;
|
||||
return $this->cache[$key];
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ trait ArrayCacheTrait
|
||||
protected function setCache(string $key, $value): void
|
||||
{
|
||||
$this->cache[$key] = $value;
|
||||
$this->ttlValues[$key] = \strtotime($this->ttl);
|
||||
$this->ttlValues[$key] = time() + $this->ttl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user