From 2b6cfc01aa17a0ea5d7e1735fb5a8104ccf67d95 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 13 Sep 2015 18:56:37 +0200 Subject: [PATCH] fixed recipe --- doc/recipes.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/recipes.rst b/doc/recipes.rst index 310a15a50..6ad53276c 100644 --- a/doc/recipes.rst +++ b/doc/recipes.rst @@ -357,9 +357,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); } }