mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 03:16:34 +00:00
minor #1827 No need to check modification time when opcache_invalidate (Tobion)
This PR was merged into the 1.x branch.
Discussion
----------
No need to check modification time when opcache_invalidate
- We know the file is new
- No need to check if opcache/apc is enabled as these methods will just return false in this case
Commits
-------
f63099e No need to check modification time when opcache_invalidate
This commit is contained in:
@@ -80,9 +80,9 @@ class Twig_Cache_Filesystem implements Twig_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')) {
|
||||
opcache_invalidate($key);
|
||||
} elseif (function_exists('apc_compile_file') && ini_get('apc.enabled')) {
|
||||
if (function_exists('opcache_invalidate')) {
|
||||
opcache_invalidate($key, true);
|
||||
} elseif (function_exists('apc_compile_file')) {
|
||||
apc_compile_file($key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user