Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

deleting cacheid groups

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
muralik
Smarty Rookie


Joined: 08 Mar 2004
Posts: 25

PostPosted: Wed Oct 27, 2004 3:05 pm    Post subject: deleting cacheid groups Reply with quote

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
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Oct 27, 2004 3:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
muralik
Smarty Rookie


Joined: 08 Mar 2004
Posts: 25

PostPosted: Wed Oct 27, 2004 3:15 pm    Post subject: fixed Reply with quote

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
View user's profile Send private message
muralik
Smarty Rookie


Joined: 08 Mar 2004
Posts: 25

PostPosted: Wed Oct 27, 2004 3:33 pm    Post subject: thx Reply with quote

thx boots, i didnt see your reply,

i have a question though..

why do we need a trailing "|" ?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Oct 27, 2004 3:44 pm    Post subject: Reply with quote

hmm, I don't think it is needed. I cut-pasted your example Smile
Back to top
View user's profile Send private message
koejkje
Smarty Rookie


Joined: 27 Nov 2003
Posts: 30
Location: Miami, Florida

PostPosted: Wed Feb 02, 2005 7:15 am    Post subject: Reply with quote

I am doing exactly this with no luck. Are there any common problems associated with clearing cache?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP