Re: Selective cache clean
| From: | Monte Ohrt | Date: | Wed, 20 Mar 2002 16:32:28 +0000 |
| Subject: | Re: Selective cache clean | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3127@lists.php.net to get a copy of this message | ||
That is right, actually it is now a crc32() instead of md5, but its the
same concept.
But (if we're understanding each other correctly), this will not work
because the generated id (filename) is totally different for similar
cache ids.
Let's say you have a cache_id of "Internal/Books/Metaverse". This would
generate an id for the filename, lets say 123456789. Now, If I wanted to
remove all cache files with cache_ids that started with "Internal", this
would not be possible. The generated id for "Internal" would NOT be a
subset of 123456789. It would be something totally unrelated like
384759685.
Monte
Ivo Jansch wrote:
>
> Hi,
>
> Monte Ohrt wrote:
>
> > This isn't currently possible, but it has been brought up before. The
> > cacheid is not part of the filename, nor is it in the cached file. If
> > you wanted to delete by partial cacheid we'd have to adjust something,
> > like put the cacheid in the filename. Smarty used to do this in way
> > earlier versions, but then we had to URL-encode cacheids and you can end
>
> Hmm..
> If I remember correctly, the filenames is some kind of md5, isn't it?
> Wouldn't it be possible to generate an md5 of the string I'm looking
> for, and deleting everything from the cache where that generated md5 is
> a substring of the filename?
>
> Or is an md5 of a substring of a string not a substring of the md5 of
> the string? (Complex sentence ;-)
>
> Greetings,
> Ivo
>
> --
> Ivo Jansch <ivo@ibuildings.nl>
> ibuildings.nl BV - information technology
> http://www.ibuildings.nl
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
Director of Technology, ispi Inc.