After almost a year of work on Symfony, then on my custom library, then on FOSHttpCache we are finally able to use the components and their new functionality in Contao.
It mainly unlocks 4 things:
Our reverse proxy (var/cache/http_cache) is faster now than before due to optimizations in the Psr6Store.
Our reverse proxy (var/cache/http_cache) is now self-managed which means it cleans up old cache entries automatically instead of filling up the cache directory forever.
The new cache allows for more options providing the possibility to use a different back end if you don't want to use the local filesystem.
Finally, we can tag cache entries! 🎉 With these changes in place, the Contao ME is configured automatically in a way that you can easily tag a response and invalidate it later on. See http://foshttpcachebundle.readthedocs.io/en/latest/features/tagging.html#tagging-and-invalidating-from-php-code for the documentation on how to tag and invalidate again. It opens up an armada of new possibilities. You can now for example tag page responses so we could offer clearing the page cache on a per-page basis. Or you could cache a news entry forever until somebody edits it again etc. pp.
I did not include any integrations yet but I'm sure e.g. @dmolineus will want to try adding them as soon as this got merged into master 😄
Wow, one year of work and it ends up being a few lines of code to integrate third party code. Composer FTW 😄
After almost a year of work on Symfony, then on my custom library, then on FOSHttpCache we are finally able to use the components and their new functionality in Contao. It mainly unlocks 4 things:
var/cache/http_cache
) is faster now than before due to optimizations in thePsr6Store
.var/cache/http_cache
) is now self-managed which means it cleans up old cache entries automatically instead of filling up the cache directory forever.I did not include any integrations yet but I'm sure e.g. @dmolineus will want to try adding them as soon as this got merged into master 😄
Wow, one year of work and it ends up being a few lines of code to integrate third party code. Composer FTW 😄