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.

eZ debug

Timing: Jan 19 2025 00:23:18
Script start
Timing: Jan 19 2025 00:23:18
Module start 'layout'
Timing: Jan 19 2025 00:23:18
Module start 'content'
Timing: Jan 19 2025 00:23:19
Module end 'content'
Timing: Jan 19 2025 00:23:19
Script end

Main resources:

Total runtime1.0765 sec
Peak memory usage4,096.0000 KB
Database Queries79

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.9219152.6250
Module start 'layout' 0.00720.0039 740.546939.4609
Module start 'content' 0.01111.0635 780.0078703.8672
Module end 'content' 1.07460.0018 1,483.875024.1563
Script end 1.0765  1,508.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3537160.0002
Check MTime0.00140.1285160.0001
Mysql Total
Database connection0.00100.094510.0010
Mysqli_queries0.978390.8781790.0124
Looping result0.00100.0924770.0000
Template Total1.025695.320.5128
Template load0.00260.237820.0013
Template processing1.023095.032020.5115
Template load and register function0.00010.011110.0001
states
state_id_array0.00090.085810.0009
state_identifier_array0.00110.104120.0006
Override
Cache load0.00200.1827530.0000
Sytem overhead
Fetch class attribute can translate value0.00070.065440.0002
Fetch class attribute name0.00110.1038130.0001
XML
Image XML parsing0.00190.180340.0005
class_abstraction
Instantiating content class attribute0.00000.0037180.0000
General
dbfile0.00460.4312340.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs