mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
2b6a9e023b948e543bd93ed32f9620e2ba2dc8ea
This PR was merged into the 1.x branch.
Discussion
----------
Non-existing files are not cached by statcache
Reverts #1583
Based on the docs this cannot happen because the stat cache is only active for existing files.
> You should also note that PHP doesn't cache information about non-existent files. So, if you call file_exists() on a file that doesn't exist, it will return FALSE until you create the file. If you create the file, it will return TRUE even if you then delete the file. However unlink() clears the cache automatically.
http://php.net/manual/en/function.clearstatcache.php
Also the arugments you pass to clearstatcache(false, $filename) make no sense according the documentation and are not effective.
> filename
Clear the realpath and the stat cache for a specific filename only; only used if clear_realpath_cache is TRUE.
Also doctrine cachee does't use this approach either: https://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/FileCache.php#L185 And nobody reported problems with this as far as I can see.
Commits
-------
4edf3fd Non-existing files are not cached by statcache
…
Twig, the flexible, fast, and secure template language for PHP ============================================================== Twig is a template language for PHP, released under the new BSD license (code and documentation). Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment. More Information ---------------- Read the `documentation`_ for more information. .. _documentation: http://twig.sensiolabs.org/documentation
Description
Languages
PHP
99.9%