This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » [3.3.0-2] Cache block doesn't really...

[3.3.0-2] Cache block doesn't really block?

[3.3.0-2] Cache block doesn't really block?

Wednesday 24 December 2003 3:49:09 pm - 3 replies

{cache-block expiry=1}

The file bla.php shows a different image, each time you load it. But, if I use the above code, it doesn't do what I want it to do. So.. what am I doing wrong here?

I found a file in the cache folder, containing '$contentData = "<img src=>";'. This is one of the images bla.php is supposed to show. It should also show image2.jpg and image3.jpg.

-- Mårk big-smile.gif Emoticon

ps; Merry Christmas everybody!!

Modified on Wednesday 24 December 2003 3:54:39 pm by Mark Overduin

Wednesday 24 December 2003 6:23:01 pm

Marc, if you need a different HTML code (img-tag) every time you call the page, i think, you cannot use a cache-block at all. Why should you want to cache it, when the contents changes from one call to the next?
Did you want to expire the cache after 1 second with your code? Should work as you expected (judging from I suggest, that you try without caching first. If this works, maybe there is an issue with including PHP (you used an operator) and cache-block in general.

Tuesday 30 December 2003 11:26:02 am

I don't quite understand what you are saying.

Anyways, I'll try to tell you what I have been doing.
Everythin works great if I don't use cache-blocks AND viewcaching=DISabled. But, of course, when my site is ready, I want to enable caching, to give my server a break.

So, I enabled viewcaching. But, now it doesn't work of course, because my included pages (which I include with the operator) are cached. Now I see just one page (static), instead of multiple pages (dynamic). So far, it's all normal and works as expected.

Okay, then I found out there are cache-blocks. Everything within these cache-blocks will not be cached. I read on and found out that the stuff within these cache-blocks do get cached. It will be stored for two hours. But I don't want it to be cached at all!
Well, since I couldn't find anything about real cache-blocking, I used expiry=1, so the created cache should expire after 1 second, am I right? Anyways, this still does not work. The included page still gets cached.

Of course, I checked if the page itself is correct. And it worked great. Each time I load the page, a different image is shown to me.

How can I make this work? Is it possible to really block the page from caching???

-- Mark

Tuesday 30 December 2003 2:41:30 pm

Still not solved, but I found another solution that will probably fit my needs:

-- Mark


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

36 542 Users on board!

Forums menu

Proudly Developed with from