mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
ensure PHP opcache gets invalidated, when storing data in file parsed via PHP require
This commit is contained in:
parent
9b7daf5d0a
commit
6054e99849
3 changed files with 7 additions and 10 deletions
|
|
@ -269,6 +269,7 @@ class Filesystem extends AbstractData
|
|||
{
|
||||
switch ($namespace) {
|
||||
case 'purge_limiter':
|
||||
opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php');
|
||||
return $this->_storeString(
|
||||
$this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php',
|
||||
'<?php' . PHP_EOL . '$GLOBALS[\'purge_limiter\'] = ' . var_export($value, true) . ';'
|
||||
|
|
@ -280,6 +281,7 @@ class Filesystem extends AbstractData
|
|||
);
|
||||
case 'traffic_limiter':
|
||||
$this->_last_cache[$key] = $value;
|
||||
opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php');
|
||||
return $this->_storeString(
|
||||
$this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php',
|
||||
'<?php' . PHP_EOL . '$GLOBALS[\'traffic_limiter\'] = ' . var_export($this->_last_cache, true) . ';'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue