Re: [SMARTY] Cache cleanup
| From: | Monte Ohrt | Date: | Fri, 14 Jun 2002 16:06:27 +0000 |
| Subject: | Re: [SMARTY] Cache cleanup | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4853@lists.php.net to get a copy of this message | ||
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:-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.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