|
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 |
Cojoc Alexandru Sorin Smarty n00b
Joined: 23 Mar 2017 Posts: 3 Location: Staffordshire, United Kingdom
|
Posted: Mon Apr 03, 2017 10:49 am Post subject: Delete all cache by id |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Apr 03, 2017 12:31 pm Post subject: |
|
|
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 |
|
Cojoc Alexandru Sorin Smarty n00b
Joined: 23 Mar 2017 Posts: 3 Location: Staffordshire, United Kingdom
|
Posted: Mon Apr 03, 2017 1:13 pm Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Apr 04, 2017 1:34 pm Post subject: |
|
|
You can use $lang as $compile_id, if you want to separate different languages into different caching groups. |
|
Back to top |
|
Cojoc Alexandru Sorin Smarty n00b
Joined: 23 Mar 2017 Posts: 3 Location: Staffordshire, United Kingdom
|
Posted: Wed Apr 05, 2017 9:42 am Post subject: |
|
|
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 |
|
|
|
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
|