On Mon, 26 Sep 2011 15:06:12 +0100, Bas Kooij <kooy...@hotmail.com> wrote:

I make use of tal:cache attributes for an e-commerce
website. The cache expression for a block element
containing product info looks like this:

30d per php:product.GetProductId() . languageCode . productsLastUpdate

Obviously, if language or productId changes I want to
keep the cache files. But, if the variable productsLastUpdate
changes all cached files for this block become obsolete.
Is there any way to delete the files that were cached using this
identifier? Or do I just have to wait 30 days for the cache to
be cleared automatically.

I'd usually just recommend to leave them there, but as you report that you reach limits of glob(), then clearly this isn't a good solution for you.

Since PHPTAL names cached files after md5() of cache key, there is no easy way to delete only specific obsolete files.

You might have more luck with method Marco linked to — find command can deal with lots of files and you can run cleanup as often as you need.

regards, Kornel Lesiński

PHPTAL mailing list

Reply via email to