From 999e54efb0ac83d0a8175365269eb0384d60eab7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 3 Apr 2012 07:20:03 +0200 Subject: [PATCH] fixed filesystem loader freshness logic for high traffic websites (closes #682) --- CHANGELOG | 2 +- lib/Twig/Loader/Filesystem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e177e0c..ab6f198 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ * 1.6.5 (2012-XX-XX) - * n/a + * fixed filesystem loader freshness logic for high traffic websites * 1.6.4 (2012-04-02) diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index be348aa..5cd40f9 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -106,7 +106,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface */ public function isFresh($name, $time) { - return filemtime($this->findTemplate($name)) < $time; + return filemtime($this->findTemplate($name)) <= $time; } protected function findTemplate($name) -- 1.7.2.5