simplified cache management

git-svn-id: http://svn.twig-project.org/trunk@130 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
fabien
2009-11-11 16:51:39 +00:00
parent 84113a960c
commit 03e02718d6
+1 -6
View File
@@ -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);
}