Re: [SMARTY] Delete all cached files for a template file
| From: | Aliba Sora | Date: | Wed, 29 Jan 2003 07:03:59 +0000 |
| Subject: | Re: [SMARTY] Delete all cached files for a template file | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7383@lists.php.net to get a copy of this message | ||
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.