Static cache working the wrong way

Author Message

J-A Eberhard

Monday 06 June 2005 2:53:31 pm

Hi,

I have a very strange behavior of the static cache in 3.6.

If I click on the 'Regenerate static content cache' button, the static cache is cleared...
If I select in the clear cache dropdown 'static', the cache is created...
If I update an object, the static cache is not regenerated.

I tried with another eZ site on another server, same behavior!!

JAE

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Łukasz Serwatka

Tuesday 07 June 2005 12:17:52 am

Hi,

In 3.6.0 version were two bugs in static cache regeneration

http://ez.no/bugs/view/6706
http://ez.no/bugs/view/6704

I suggest to download fixed files from SVN and replace it with originals in your distribution.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

J-A Eberhard

Tuesday 07 June 2005 5:42:17 am

Hi,

Which files to download. I went to pubsvn.ez.no and downloaded the 3.6.0 but it was the same problem.
Then I took the http://pubsvn.ez.no/ezpublish-latest-trunk.tar.gz but it's a 3.7.0 alpha1.
Where are the latest patches for 3.6.0?

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Łukasz Serwatka

Tuesday 07 June 2005 5:45:17 am

The lates stable version of 3.6 you can get from
http://pubsvn.ez.no/nextgen/stable/3.6/

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kristian Hole

Tuesday 07 June 2005 7:45:13 am

There is just two small lines you need to add:

--- kernel/setup/cache.php      (revision 12105)
+++ kernel/setup/cache.php      (revision 12106)
@@ -118,6 +118,7 @@

     $staticCache = new eZStaticCache();
     $staticCache->generateCache( true, true );
+    eZStaticCache::executeActions();
     $cacheCleared['static'] = true;
 }

and

--- bin/php/makestaticcache.php (revision 12103)
+++ bin/php/makestaticcache.php (revision 12104)
@@ -67,6 +67,8 @@
     $staticCache->generateAlwaysUpdatedCache();
 }

+eZStaticCache::executeActions();
+
 $script->shutdown();

And then is should work :)

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

J-A Eberhard

Tuesday 07 June 2005 8:06:18 am

I installed the whole http://pubsvn.ez.no/nextgen/stable/3.6/ and manually verify that both files are as shown above but I still have both buttons (clear cache and generate new) working the same way. Both regenerate the cache with new files.
If I edit an object, the new cached files for this object are correctly updated.
It's working but I just can't clear the cache...
JAE

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Hans Melis

Tuesday 07 June 2005 12:43:15 pm

I think the same bug exists in a few more places. I'm gonna grep all php files for similar code, and check what needs updating.

One thing's clear, clearing the static cache from the admin toolbar should regenerate the cache. There is no way to really delete all static cache. If you want to do that, delete all files in your static cache storage dir.

Hans
http://blog.hansmelis.be

Hans Melis

Tuesday 07 June 2005 1:30:52 pm

I've filed a bug report about the remaining locations that need some patching.

http://ez.no/bugs/view/6741

The patch should land quite soon once it's been approved.

Hans
http://blog.hansmelis.be

J-A Eberhard

Tuesday 07 June 2005 3:10:33 pm

If 'Clear the static cache' on the left menu has the same effect that 'Regenerate the static cache' why having both...

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.