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 » Developer » caching



Tuesday 09 August 2011 3:38:21 pm - 3 replies

Ok so I think that's a big question but I'm actually seeking for the best way to turn that.

Well let's go. On my website front page I have a ajax call that loads many things about user prefs. This call performs a big bunch of PHP script on the server. I would like to cache this.

The question comes here can I use the eZCache and if so how can I do it  so that when cache is purged my cache files will also be purged.

Tuesday 23 August 2011 3:42:18 pm

hmm as i understand you want to use the cache mechanism of ez ?

if so why dont you parse a template file at your AJAX call ?
then ezpublish will have the control.

Tuesday 23 August 2011 4:15:52 pm

Using a template for ajax responses is a good idea as long as the data you are showing is coming from a node - because you will benefit of view caching out of the box.

If the data is mixed (coming from different parts of the database), you have to do different things:

- if you are using a "proxy" node to display it, you will have to reset the view cache using the set-block template function to eg. only last five minutes

- if you are using a system template for a custom view of yours, you will need to use the cache-block template function instead, as there is no view cache in action


If otoh you want to manipulate caches in php code, you can look up how it is done eg. here: You also need to declare your cache in site.ini (eg:

There should be a nice tutorial around from Bertrand Dunogier on this topic, but I cannot find it at the moment - maybe it's in some conference slide set...

Modified on Tuesday 23 August 2011 4:17:08 pm by Gaetano Giunta

Wednesday 24 August 2011 1:01:05 pm

I'm also interested in this resource!


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

36 542 Users on board!

Forums menu

Proudly Developed with from