Merge branch '1.x'

* 1.x:
  fixed recipe
  No need to check modification time when opcache_invalidate
This commit is contained in:
Fabien Potencier
2015-09-13 18:56:45 +02:00
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -354,9 +354,9 @@ 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') && ini_get('opcache.enable')) {
opcache_invalidate($file);
} elseif (function_exists('apc_compile_file') && ini_get('apc.enabled')) {
if (function_exists('opcache_invalidate')) {
opcache_invalidate($file, true);
} elseif (function_exists('apc_compile_file')) {
apc_compile_file($file);
}
}
+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);
}
}