eZ Community » Forums » General » template-block cache with expired files
expandshrink

template-block cache with expired files

template-block cache with expired files

Thursday 05 December 2013 8:32:22 am - 2 replies

Why do I keep on finding expired files in

.../cache/template-block

even if DelayedCacheBlockCleanup=disabled  ?

This happens in a whole variety of different ez installations.

By "expired files" I mean: files with date older then "global-template-block-cache" timestamp in expiry.php. 

Let's assume I don't use ezcache.php, there are not any crash or similar ...

From what I understood from all docs about template-block cache (I mean Gilles') I should not find any expired file in there.

 

btw: what is the "template-block-cache" variable in expiry.php for?

Sunday 20 April 2014 9:14:17 am

We've maybe found out why we keep on finding expired (so, useless) template-block cache (and since its size is pretty big, it becomes an issue).  The reason seems to be pretty simple:

  • when developers clear the cache using the web dashboard, the cache is cleared without "--purge"
  • since no cache clear is done by command line with  "--purge", expired (useless) files stays in the filesystem forever.

The question now is: 

How to remove from the filesystem the expired template-cache, so to free diskspace?

I mean to remove just the expired cache, not all of it?

 

The perfect solution should be the "--expiry" option in http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Scripts/Generic/ezcache.php

but this option it simply does not work as fare as we understood

To replicate:

  • expire the cache with 
 php bin/php/ezcache.php --clear-id=template-block
  • generate some cache
  • remove cache older then "yesterday" (so it should remove nothing at all!) with
 php bin/php/ezcache.php --clear-id=template-block --expiry="yesterday"  --purge

now the latter happens to remove the whole "template-block" cache (the whole directory), while I would expect it would not remove anything at all, so the "expiry" is just ignored.

Any advice?

(We are talking about eZ Publish version: 4.5.0, with ordinary filehandler)

Wednesday 23 April 2014 2:28:19 pm

Have you tried without clearing cache first, only purge ?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from