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
This commit is contained in:
Tobias Schultze
2015-09-13 18:50:03 +02:00
parent b673f65d34
commit f63099e00b
+3 -3
View File
@@ -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);
}
}