clear_cache unexpected behavior
| From: | Ubaldo Huerta | Date: | Wed, 12 Feb 2003 13:25:08 +0000 |
| Subject: | clear_cache unexpected behavior | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7676@lists.php.net to get a copy of this message | ||
Hi all,
I'm wondering if it's my misunderstanding of the way the API should work or if it's
simply a bug (hard to believe given the maturity of smarty). I've been using it myself for more
5 months now in production and it's remarkably predictable.
So the question is:
Shouldn't clear_cache('foo.tpl') clear all caches for that template, period? I'm
observing that this is NOT happening.
In my particular setup, I'm using compile id (because it's handy to do multilanguage
sites) and also cache groups (because I'm caching pages in a result set', that is,
I'm calling display in the following way
display('foo.tpl', '0|1', 'english') // first page of
display('foo.tpl', '0|2', 'spanish)
display('foo.tpl', '1|1', 'catalan')
... so on ....
So, my goal is to get rid of all caches (all languages) for all pages, so I thought that
clear_cache('foo.tpl') should do it, but it doesn't seem to work. Note that the
following DOES work:
clear_cache('foo.tpl', '0')
clear_cache('foo.tpl', '1')
and so on ....
but that'll force me to keep track of all possible cache ids for template 'foo.tpl'.
Am I making any sense?
BTW, I tried it with Smarty 2.4.2 and still didn't work
Thank you.
Ubaldo
LoQUo Barcelona Community
www.loquo.com