Re: [SMARTY] Problem clearing cache groups

From: Date: Mon, 12 Sep 2005 18:09:44 +0000
Subject: Re: [SMARTY] Problem clearing cache groups
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13028@lists.php.net to get a copy of this message
On Mon, Sep 12, 2005 at 07:29:48PM +0200, Ivo Jansch wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I am following the docs on cachegroups, but cannot get it to work properly. > > I render a template (using $smarty->fetch) 3 times, with these cache_ids: > > /index > /index|lng=nl > /index|lng=de > > (The url is the first group, a language is the second). > > Now I call $smarty->clear_cache with the following cache_id: > > /index > > No I expect the cache to be cleared entirely, because this is my main > group. However, only the first page (the one without lng param) is > cleared from the cache. So the grouping seems not to work. cache_groups only work, if you leave out the template parameter of clear_cache(). $smarty->clear_cache(null, '/index') # should work as expected $smarty->clear_cache('index.tpl', '/index') # only clears one cached file HTH messju > If I have a look at my cache dir, this is in it after the call to > clear_cache: > > [root@nikita pages]# find > . > ./%2Findex > ./%2Findex/lng%3Dde > ./%2Findex/lng%3Dde/%%16 > ./%2Findex/lng%3Dde/%%16/168 > ./%2Findex/lng%3Dde/%%16/168/1689F4FD%%test.tpl > ./%2Findex/lng%3Dnl > ./%2Findex/lng%3Dnl/%%16 > ./%2Findex/lng%3Dnl/%%16/168 > ./%2Findex/lng%3Dnl/%%16/168/1689F4FD%%test.tpl > > So you can see that the 2 caches for the 2 subgroups remain. > > Any idea what could cause this? > > Greetings, > Ivo > > - -- > Ivo Jansch <ivo@ibuildings.nl> > ibuildings.nl BV - information technology > http://www.ibuildings.nl > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (MingW32) > Comment: Using GnuPG with Thunderbird - > http://enigmail.mozdev.org > > iD8DBQFDJbsM95NUnGFZm9cRAsocAKCyEf4Nyw2CGKWheyVKGXAGBVsBVgCg56dE > Vedq+8waalNRMwHBMKqxn/o= > =+U1E > -----END PGP SIGNATURE----- > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#13028) next »