This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Blogs » Core Development team » New in eZ 5.4: HTTP cache reloaded


New in eZ 5.4: HTTP cache reloaded

Wednesday 12 November 2014 1:49:49 pm

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Being built on top of Symfony, that can be called an HTTP framework, Varnish support in eZ Publish is implicit. In 5.2 we introduced context-aware Http cache, allowing cache to be shared even for authenticated users. Version 5.4 goes one step further, adding native support for Varnish 4 and other fancy stuff…

Implementation of HTTP cache in eZ was considered great so far, being with purge-on-publish mechanism, context-aware caching or Symfony reverse proxy support. However a few drawbacks appeared during the last year:

  • Multiple HTTP requests approach when purging (one per location).
  • cURL vmod needed with Varnish, making mandatory to compile Varnish and avoiding to use Varnish 4 without a Varnish+ subscription.
  • Cache objects bound to only one location at a time.

Introducing FOSHttpCacheBundle

FOSHttpCacheBundle is the result of the merge of 2 bundles, LiipCacheControlBundle and DriebitHttpCacheBundle. It provides Symfony integration for very high quality components regarding Http cache management and covers really cool features such as:

In short, FOSHttpCacheBundle provides standard tools for Http cache management to be used with Symfony.

Integration in eZ

Integrating it was a real opportunity and allowed us to tackle at least 2 of the points listed in the introduction. As of 5.4 / 2014.11, a single BAN request is used when purging on publish (so increasing performance on publish) and eZ now supports Varnish 4 (VCL for Varnish 3 has been updated as well).

As for the 3rd point in the list above, given the complexity a follow-up story has been created in order to use response tagging from FOSHttpCacheBundle to tackle this limitation.

Contributing back to the Symfony ecosystem

From version 5.0 when we made ourselves part of the Symfony ecosystems, we have made sure to pick best of breed libraries/bundles and contribute back to them. Same is the case with Symfony reverse proxy, which we extended, something we have now contributed back to the community to make it part of the awesome FOSHttpCacheBundle, so every Symfony developer can take advantage of it.

We also contributed on FOSHttpCache library to fix an annoying issue when using Apache and Symfony HttpCache.

More info

Proudly Developed with from