logo       

Re: [SMARTY] Delete all cached files for a template file: msg#00408

php.smarty.general

Subject: Re: [SMARTY] Delete all cached files for a template file

I'm not sure the correct way, but I've been doing it with a group and
cacheid.

For each file that you are currently using the cacheid with you can add a
group like so....

from:
$cache_id = $article_id;
to:
$cache_id = "news|$article_id";

that way you can clear all cached files that belong to group 'news' with
$smarty->clear_cache(null, 'news');

or a specific one with
$smarty->clear_cache(null, 'news|$article_id');

There is more info in the docs under 'caching'
http://smarty.php.net/manual/en/caching.groups.php

On Tuesday 28 January 2003 22:45, K. Ono wrote:
> What I wanted to do is delete all cached files (with different cache IDs)
> for a template file if cache ID was not passed to the clear_cache() method.
>
> Am I right that this is not still possible in the current version? If so,
> it would be very useful if this feature is added in the future versions..
>
> Thanks in advance.


--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise