mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #4185 from marc1706/ticket/13681
[ticket/13681] Invalidate and reset opcache where necessary * marc1706/ticket/13681: [ticket/13681] Invalidate and reset opcache where necessary
This commit is contained in:
commit
6e4ab6509b
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?>");
|
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
if (function_exists('opcache_invalidate'))
|
||||||
|
{
|
||||||
|
@opcache_invalidate($this->cache_file);
|
||||||
|
}
|
||||||
|
|
||||||
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
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?>");
|
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
if (function_exists('opcache_invalidate'))
|
||||||
|
{
|
||||||
|
@opcache_invalidate($this->cache_file);
|
||||||
|
}
|
||||||
|
|
||||||
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||||
|
|
||||||
$this->data = array();
|
$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_rowset);
|
||||||
unset($this->sql_row_pointer);
|
unset($this->sql_row_pointer);
|
||||||
|
|
||||||
|
if (function_exists('opcache_reset'))
|
||||||
|
{
|
||||||
|
@opcache_reset();
|
||||||
|
}
|
||||||
|
|
||||||
$this->vars = array();
|
$this->vars = array();
|
||||||
$this->sql_rowset = array();
|
$this->sql_rowset = array();
|
||||||
$this->sql_row_pointer = 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);
|
fclose($handle);
|
||||||
|
|
||||||
|
if (function_exists('opcache_invalidate'))
|
||||||
|
{
|
||||||
|
@opcache_invalidate($file);
|
||||||
|
}
|
||||||
|
|
||||||
if (!function_exists('phpbb_chmod'))
|
if (!function_exists('phpbb_chmod'))
|
||||||
{
|
{
|
||||||
global $phpbb_root_path;
|
global $phpbb_root_path;
|
||||||
|
|
Loading…
Add table
Reference in a new issue