Cache-block and variables

Author Message

Rinze Cats

Wednesday 19 May 2004 12:44:26 am

Hi, i am implementing cache blocks to speed up my page.

On my page, I have a large block of code that cycles through a number of related objects. Using a switch statement, a number of variables are assigned values (using set blocks). The values are used later on in the page.

Putting the variable calls in cache blocks works fine. However, the code that assigns values to the variables is very slow and should run only once (given the expiry time).

My question is: the code doesn't generate any html, can I put it in a cache block and what happens if I do this (it seems to work). Is there a better way to make it only run until something is re-published?

When I don't cache the variable calls, they are empty. So adding a cache block to the logic simply prevents it from running again, this isn't what the cache-block is for, is it?

greetz
rinze

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.