cache/compile garbage collection
| From: | Monte Ohrt | Date: | Wed, 17 Jul 2002 13:54:54 +0000 |
| Subject: | cache/compile garbage collection | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-203@lists.php.net to get a copy of this message | ||
I added a new paramater to clear_all_cache(), clear_cache() and clear compiled_tpl(). You can now specify (in seconds) how old the file(s) must be before they are cleared.
// clear all cache files older than one hour
clear_all_cache(3600);
//clear all cache_id = 'blue' older than one day
clear_cache(null,'blue',null,86400);
// clear all compiled templates older than one week
clear_compiled_tpl('index.tpl',null,604800);
This still isn't an automated way of handling garbage collecting, but now you can at least do it programatically through Smarty.
good/bad method?
Monte