|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
muralik Smarty Rookie
Joined: 08 Mar 2004 Posts: 25
|
Posted: Wed Oct 27, 2004 3:05 pm Post subject: deleting cacheid groups |
|
|
Not sure how cache id groups works
i have cache ids like this
12-1, 12-2, 12-3
now i want to delete all cache which starts with 12
so i did like this
$my_cache_id ="12-1|";
$smarty->display("abc.tpl", $my_cache_id);
and while deleting cache
$smarty->clear_cache(null,"12|");
this doesnt delete.., am i doing correct?
here 12 is my category id, and 1 is page number |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Oct 27, 2004 3:11 pm Post subject: |
|
|
Nope. AFAIK, it is better to use cascaded cache id's like:
12|1, 12|2, 12|3
for that behaviour. EG:
$my_cache_id ="12|1|";
$smarty->display("abc.tpl", $my_cache_id);
...
$smarty->clear_cache(null,"12|"); |
|
Back to top |
|
muralik Smarty Rookie
Joined: 08 Mar 2004 Posts: 25
|
Posted: Wed Oct 27, 2004 3:15 pm Post subject: fixed |
|
|
actually fixed now
i modified like this
$my_cache_id = "12|1";
$smarty->display("abc.tpl", $my_cache_id);
to clear cache
$smarty->clear_cache("null", "12"); |
|
Back to top |
|
muralik Smarty Rookie
Joined: 08 Mar 2004 Posts: 25
|
Posted: Wed Oct 27, 2004 3:33 pm Post subject: thx |
|
|
thx boots, i didnt see your reply,
i have a question though..
why do we need a trailing "|" ? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Oct 27, 2004 3:44 pm Post subject: |
|
|
hmm, I don't think it is needed. I cut-pasted your example |
|
Back to top |
|
koejkje Smarty Rookie
Joined: 27 Nov 2003 Posts: 30 Location: Miami, Florida
|
Posted: Wed Feb 02, 2005 7:15 am Post subject: |
|
|
I am doing exactly this with no luck. Are there any common problems associated with clearing cache? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|