Re: [SMARTY] cache date and time
| From: | Ivo Jansch | Date: | Wed, 05 Jun 2002 13:47:17 +0000 |
| Subject: | Re: [SMARTY] cache date and time | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4618@lists.php.net to get a copy of this message | ||
Hi,
Monte Ohrt wrote:
How would you get the cache id? You need that to get the cache in the first place.Maybe there should be 2 id's. Think of this situation: Suppose in a site, I have several pages, each of which uses the same template (say page.tpl) . Each page is identified by some id (I'll call it a page_id for now). On some pages, there are some dynamic elements, whose output depends on variables passed through the url (showpage.php?page_id=10&newsitem=20 etc.) So my cache_id for page.tpl is based on the page_id and the url variables. So far so good, this is already possible in Smarty. But now I change the content of the page with page_id 20. I need to be able to tell the cache: delete all cached pages that are based on page_id 20 (so different cache_id's, but the same page_id). So actually, I should be able to 'group' cached versions of a page based on something (in this case, we group all cached pages that have the same page_id). Cache management could then have the following features: 1) expire after a certain ammount of time (current implementation) 2) expire cached page with a certain cache_id (new) 3) expire group of cached pages with a certain page_id (new) I think this would be useful in more than a few occasions. A lot of Smarty applications contain content management systems that could use method 2 and 3. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl