mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13681] Invalidate and reset opcache where necessary
PHPBB3-13681
This commit is contained in:
parent
17e21d5140
commit
bd12427fd4
3 changed files with 20 additions and 0 deletions
|
@ -859,6 +859,11 @@ class queue
|
|||
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
|
||||
fclose($fp);
|
||||
|
||||
if (function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($this->cache_file);
|
||||
}
|
||||
|
||||
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||
}
|
||||
}
|
||||
|
@ -901,6 +906,11 @@ class queue
|
|||
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
|
||||
fclose($fp);
|
||||
|
||||
if (function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($this->cache_file);
|
||||
}
|
||||
|
||||
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
||||
$this->data = array();
|
||||
|
|
5
phpBB/phpbb/cache/driver/base.php
vendored
5
phpBB/phpbb/cache/driver/base.php
vendored
|
@ -61,6 +61,11 @@ abstract class base implements \phpbb\cache\driver\driver_interface
|
|||
unset($this->sql_rowset);
|
||||
unset($this->sql_row_pointer);
|
||||
|
||||
if (function_exists('opcache_reset'))
|
||||
{
|
||||
@opcache_reset();
|
||||
}
|
||||
|
||||
$this->vars = array();
|
||||
$this->sql_rowset = array();
|
||||
$this->sql_row_pointer = array();
|
||||
|
|
5
phpBB/phpbb/cache/driver/file.php
vendored
5
phpBB/phpbb/cache/driver/file.php
vendored
|
@ -568,6 +568,11 @@ class file extends \phpbb\cache\driver\base
|
|||
|
||||
fclose($handle);
|
||||
|
||||
if (function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($file);
|
||||
}
|
||||
|
||||
if (!function_exists('phpbb_chmod'))
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
|
Loading…
Add table
Reference in a new issue