mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Allow to disable cache gc. By using a falsey value for probability
you can disable cache gc calls.
This commit is contained in:
parent
7853189328
commit
e2b37d8ec9
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ class Cache {
|
|||
$cacheClass = $class . 'Engine';
|
||||
$this->_engines[$name] =& new $cacheClass();
|
||||
if ($this->_engines[$name]->init($config)) {
|
||||
if (time() % $this->_engines[$name]->settings['probability'] === 0) {
|
||||
if ($this->_engines[$name]->settings['probability'] && time() % $this->_engines[$name]->settings['probability'] === 0) {
|
||||
$this->_engines[$name]->gc();
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue