mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00
Cache::remember -1 = infinite
This commit is contained in:
@@ -115,6 +115,11 @@ class Cache
|
||||
return unserialize($value);
|
||||
}
|
||||
|
||||
// -1 for infinite cache
|
||||
if ($ttl == -1) {
|
||||
$ttl = 10 * 365 * 24 * 60 * 60; // 10 years should be enough
|
||||
}
|
||||
|
||||
$value = $callback();
|
||||
$cache->set($key, serialize($value), $ttl);
|
||||
return $value;
|
||||
|
Reference in New Issue
Block a user