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:
Fabien Potencier
2015-09-13 18:55:45 +02:00
+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);
}
}