Re: [SMARTY] Additional identifier needed

From: Date: Wed, 01 May 2002 18:04:18 +0000
Subject: Re: [SMARTY] Additional identifier needed
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3959@lists.php.net to get a copy of this message
"Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag news:3CD02C02.3040306@ispi.net... > Why not combine them to form a single cache id? > > $smarty -> fetch ($template, $block_id.$cache_id); > > $smarty -> clear_cache ($template, $block_id.$cache_id); Because i need to be able to delete from a specified id. There will be many different versions of one block, dependent on log status, users status, targetgroup the user belongs to and and and... To seperate these different versions i user the standard cache_id. But all these different version would be affected by a single change of the blocks content. So i want to clear all cached versions of this block by calling one "clear_cache". Norbert > > Norbert Röcher wrote: > > Hi, > > > > im doing a block based CMS, using smarty. While i'm using one > > master-template to include several "blocks" i'm in need for an > > additional, separated template-identifier, which just should contain a > > numeric ID to be able to clear cached templates from a specified > > page/block id. The new identifier should be used as a name indicator > > for a container-directory for compiled/cached files (which still use > > the standard-cache-id). > > > > Easy example: > > $block_id = 8; > > $template = 'user/moduleName/blocktype/standard'; > > $language = 'en'; > > $usergroup = 'anon'; > > > > $cache_id= $language.'/'.$usergroup; > > > > Fetch/Display: > > $block = $smarty -> fetch ($template, $block_id, $cache_id); > > > > Clear cache: > > $smarty -> clear_cache ($template, $block_id); > > ... > > $smarty -> clear_cache ($template, $block_id, $cache_id); > > should work also. > > > > Any suggestions to do this? > > > > > > Norbert > > > > > > > > -- > Monte Ohrt <monte@ispi.net> > Director of Technology, ispi Inc. >

« previous php.smarty.general (#3959) next »