mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
simplified cache management
git-svn-id: http://svn.twig-project.org/trunk@130 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
+1
-6
@@ -111,12 +111,7 @@ abstract class Twig_Loader implements Twig_LoaderInterface
|
||||
*/
|
||||
protected function save($content, $cache)
|
||||
{
|
||||
if ($fp = @fopen($cache, 'w'))
|
||||
{
|
||||
fclose($fp);
|
||||
file_put_contents($cache, $content);
|
||||
}
|
||||
else
|
||||
if (false === file_put_contents($cache, $content, LOCK_EX))
|
||||
{
|
||||
eval('?>'.$content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user