mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
Check if cached file exists
This commit is contained in:
committed by
Fabien Potencier
parent
aa1596785b
commit
154bc9d2c8
@@ -87,6 +87,10 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface
|
|||||||
*/
|
*/
|
||||||
public function getTimestamp($key)
|
public function getTimestamp($key)
|
||||||
{
|
{
|
||||||
return (int) @filemtime($key);
|
if (\file_exists($key)) {
|
||||||
|
return (int) @filemtime($key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user