Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Delete all cache by id

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Cojoc Alexandru Sorin
Smarty n00b


Joined: 23 Mar 2017
Posts: 3
Location: Staffordshire, United Kingdom

PostPosted: Mon Apr 03, 2017 10:49 am    Post subject: Delete all cache by id Reply with quote

Hi, i want to clear my cache but not all, just by cache ID .

$smarty->clearCache('default/index.tpl', $axs->set_cache_id());
$smarty->clearCache('default/register.tpl', $axs->set_cache_id());

it is posibile ?
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1044

PostPosted: Mon Apr 03, 2017 12:31 pm    Post subject: Reply with quote

You're asking an impossible question.
cache_id is secondary to the template name, if you really for some reason want to clear all templates by a cache_id, then the only way is to search for them and clear each.
Back to top
View user's profile Send private message
Cojoc Alexandru Sorin
Smarty n00b


Joined: 23 Mar 2017
Posts: 3
Location: Staffordshire, United Kingdom

PostPosted: Mon Apr 03, 2017 1:13 pm    Post subject: Reply with quote

i have lang system and when they change the laungh half is en half is in another lang...and i just can to clear all cache from website..

but i can do nocache for assign ?
something like that ?
$smarty->assign("lang", $axs->set_language() , nocache);
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1044

PostPosted: Tue Apr 04, 2017 1:34 pm    Post subject: Reply with quote

You can use $lang as $compile_id, if you want to separate different languages into different caching groups.
Back to top
View user's profile Send private message
Cojoc Alexandru Sorin
Smarty n00b


Joined: 23 Mar 2017
Posts: 3
Location: Staffordshire, United Kingdom

PostPosted: Wed Apr 05, 2017 9:42 am    Post subject: Reply with quote

AnrDaemon wrote:
You can use $lang as $compile_id, if you want to separate different languages into different caching groups.

okay, thank you
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 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