[ticket/17535] Fix Redis

PHPBB-17535
This commit is contained in:
rxu 2025-07-17 15:55:42 +07:00
parent 902c99bc0c
commit 833ed86283
No known key found for this signature in database
GPG key ID: 8117904FEDEFDD17
2 changed files with 25 additions and 1 deletions

View file

@ -45,6 +45,30 @@ abstract class memory extends \phpbb\cache\driver\base
}
}
/**
* {@inheritDoc}
*/
function purge()
{
unset($this->vars);
unset($this->sql_rowset);
unset($this->sql_row_pointer);
if (function_exists('opcache_reset'))
{
@opcache_reset();
}
$this->vars = [];
$this->sql_rowset = [];
$this->sql_row_pointer = [];
$this->is_modified = true;
// We save here to let the following cache hits succeed
$this->save();
}
/**
* {@inheritDoc}
*/

View file

@ -141,7 +141,7 @@ class redis extends \phpbb\cache\driver\memory
*/
protected function _delete(string $var): bool
{
if ($this->redis->delete($var) > 0)
if ($this->redis->del($var) > 0)
{
return true;
}