fixed filesystem loader freshness logic for high traffic websites (closes #682)
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 3 Apr 2012 05:20:03 +0000 (07:20 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 3 Apr 2012 05:20:26 +0000 (07:20 +0200)
CHANGELOG
lib/Twig/Loader/Filesystem.php

index e177e0c..ab6f198 100644 (file)
--- 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)
 
index be348aa..5cd40f9 100644 (file)
@@ -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)