mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-19 07:16:36 +02:00
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/13681] Invalidate and reset opcache where necessary
This commit is contained in:
commit
b7deef46ac
@ -873,6 +873,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);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||
@ -922,6 +927,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);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
5
phpBB/phpbb/cache/driver/base.php
vendored
5
phpBB/phpbb/cache/driver/base.php
vendored
@ -63,6 +63,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
@ -574,6 +574,11 @@ class file extends \phpbb\cache\driver\base
|
||||
|
||||
fclose($handle);
|
||||
|
||||
if (function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($this->cache_file);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$this->filesystem->phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user