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 » Forums » eZ Publish 5 Platform » viewcache.ini for platform stack

viewcache.ini for platform stack

viewcache.ini for platform stack

Monday 09 February 2015 4:35:40 pm - 5 replies

Is there going to be any settings for the new platform stack where you can configure purging of the cache. As of my understanding you can now create sub-requests that has a X-Location-Id header, thus saying that when location that refers to the x-location-id header is changed it will clear the sub-request's cache as well.

This is all fine, however often you need to clear parent directories and relations etc, like one could configure using the old "viewcache.ini" configuration file. So my question is, how should one configure the new platform stack cache clearing rules, still rely on old legacy API (viewcache.ini)?

I guess also it's possible to create event listeners that listens on publish events and clears cache, however that is a lot of code when it could be easy configurable in a yaml config file.

Monday 09 February 2015 5:13:35 pm

Hi Peter. Good news. What you suggest is already done happy.gif Emoticon. I mean, if you setup smart cache in viewcache.ini and do something in the legacy, admin, a even will clear the caches for oll the locations involved in your smart cache rules... 

i'm working with that and works like a charm, for varnish too. 

Monday 09 February 2015 8:45:51 pm

yaml re implementation of this is coming with eZ Platform, as of alpha1.

Future enhancements on this is to add support for multiple tags, to be able to efficiently clear cache across different id's (section, content type and maybe also tree if that makes sense). Blocker for this feature is Symfony reverse proxy provided by FOSHTTPCache library, it's Varnish integration already supports this.

However as Carlos mentions, just specifying rules in viewcache.ini is everything you need to do for now, it fires events to a HTTPCache purger and Persistence Cache Purger.

Tuesday 10 February 2015 9:38:51 am

Thank you both for quick replies.

Looking forward to the yaml implementation of this in alpha1! For now I guess I will use viewcache.ini implementation happy.gif Emoticon

Tuesday 10 February 2015 3:56:18 pm

Actually I was wrong, there is no yaml exposed yet in alpha1.

The underlying extensibility is there to develop your own cache clearing rules, so it is already more extensible then legacy, but by default just internally configured with same defaults as legacy had (for now, will expose yml settings in later alpha/beta).

Tuesday 10 February 2015 3:57:06 pm


We recently implemented the mechanism for "Smart HttpCache clearing". See


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from