RE: [SMARTY] Cache cleanup
| From: | Gary Loescher | Date: | Fri, 14 Jun 2002 16:15:59 +0000 |
| Subject: | RE: [SMARTY] Cache cleanup | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4856@lists.php.net to get a copy of this message | ||
What about setting up a cache cleanup probability variable
(ala PHP's gc_probability) that determines if Smarty clears
the cache when it's instantiated?
-----Original Message-----
From: Monte Ohrt [mailto:monte@ispi.net]
Sent: Friday, June 14, 2002 11:06 AM
To: Peter Bowyer
Cc: Ivo Jansch; smarty-general@lists.php.net
Subject: Re: [SMARTY] Cache cleanup
Cleaning cache files would be a considerable overhead. For _every_ cache
file (recursively) it has to open file, extract timestamp, test against
the current time and unlink if necessary. It would definately add a lot
of execution time to the engine.
It would be much more efficient to do this via cron:
find /path/to/cache -atime +2 -exec rm -f {} \;
This doesn't interefere with Smarty execution time either.
Windows users would need a different method, maybe a php script to
periodically run?
Peter Bowyer wrote:
> At 10:47 14/06/02 -0500, Monte Ohrt wrote:
>
>> It won't happen automatically. You must do it yourself periodically,
>> either with clear_cache or directly.
>
>
> Shouldn't Smarty take care of cleaning out old files?
>
> Peter
>
> --
> Maple Design - quality web design and programming
> http://www.mapledesign.co.uk
>
>
--
Monte Ohrt <monte@ispi.net>
Director of Technology, ispi Inc.
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php