mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
tweaked code
This commit is contained in:
+1
-1
@@ -361,7 +361,7 @@ To get around this, force Twig to invalidate the bytecode cache::
|
||||
parent::writeCacheFile($file, $content);
|
||||
|
||||
// Compile cached file into bytecode cache
|
||||
if (function_exists('opcache_invalidate')) {
|
||||
if (function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
|
||||
opcache_invalidate($file, true);
|
||||
} elseif (function_exists('apc_compile_file')) {
|
||||
apc_compile_file($file);
|
||||
|
||||
@@ -67,7 +67,7 @@ class FilesystemCache implements CacheInterface
|
||||
|
||||
if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
|
||||
// Compile cached file into bytecode cache
|
||||
if (\function_exists('opcache_invalidate') && ini_get('opcache.enable')) {
|
||||
if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
|
||||
opcache_invalidate($key, true);
|
||||
} elseif (\function_exists('apc_compile_file')) {
|
||||
apc_compile_file($key);
|
||||
|
||||
Reference in New Issue
Block a user