Re: [SMARTY-DEV] cache date and time

From: Date: Wed, 05 Jun 2002 16:16:03 +0000
Subject: Re: [SMARTY-DEV] cache date and time
References: 1 2 3 4 5  Groups: php.smarty.dev php.smarty.general 
Request: Send a blank email to php-smarty-dev+get-120@lists.php.net to get a copy of this message
Well that's an idea that should work. we could handle the cache_id by splitting at periods and creating a subdirectory for each part. Is this the best way? Andreas Kossmeier wrote:
Monte Ohrt wrote:
I've toyed around with the idea of adding $group_id in the past, but this just makes thing way too complicated, we already have cache_id and compile_id.
that's exactly the problem i worked on the last weeks ;) that lead to a custom cache_handler function.
Now the last issue: what if we wanted to remove caches based on cache_id alone, so we can group different template resources together? We could swap things around like this: /4444455555/117/1172603085/6666677777.php |----------|--------------|-------------| cache_id resource name compile_id
there still a problem of flexible grouping. assume an event box with differents presentations in length. a cache ID has to include e.g. the number of displayed events _and_ the group for the events, when events are updated for a group, all cache representations of that group have to be cleared. for me, this leads to a *hierarchical* cacheID like e.g.: eventGroup123.max5.whatever3 this would also lead to a deeper directory hierarchie, IMO no problem. /1158455821/1158455821/1158455821/117/1172603085/6666677777.php |--------------------------------|--------------|-------------|
  hier. cache_id                  resource name  compile_id
you now can easiliy make a clearCache("group123") or a clearCache("group123.max5") andreas
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.dev (#120) next »