|
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 |
mumuri Smarty Rookie
Joined: 06 Apr 2008 Posts: 27
|
Posted: Sun May 11, 2008 7:57 pm Post subject: minor addon clear function for handling "sports&bas |
|
|
instead of this
Code: | $smarty->clear_cache(null,'sports');
$smarty->clear_cache(null,'basketball'); |
you can do this
Code: | $smarty->clear(null,"sports&basketball"); |
Code: | function clear($template=null, $cache_ids=null, $compile_id=null, $expire=null)
{
$cache_ids=split("&",$cache_ids);
foreach ($cache_ids as $cache_id){
$this->clear_cache($template, $cache_id, $compile_id, $expire);
}
} |
see manual/en/caching.groups.php
Code: | $smarty->clear_cache(null,'sports|basketball'); |
delete sports|basketball|*
Code: | $smarty->clear_cache(null,'sports&basketball'); |
delete sports|* and basketball|* |
|
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
|