Is it possible to set expiration time for Symfony and/or Twig cache. I googled and read the docs for some time and only found the option to auto reload twig templates. As I understand this means it will check templates timestamps on every page load which doesn't seem to be a good idea. It would be great if I could set expiration time and after that period it will check timestamps or even recompile all templates fully.
You can do this in your controller before your class:
/**
* Controller
* @Cache(expires="tomorrow", public="true")
* @author Author
*/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.