Forums / Developer / Static cache working the wrong way

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

eZ debug

Timing: Jan 18 2025 21:15:57
Script start
Timing: Jan 18 2025 21:15:57
Module start 'content'
Timing: Jan 18 2025 21:15:57
Module end 'content'
Timing: Jan 18 2025 21:15:57
Script end

Main resources:

Total runtime0.1681 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7344180.8281
Module start 'content' 0.00600.0047 768.5625106.0078
Module end 'content' 0.01070.1573 874.5703534.2969
Script end 0.1680  1,408.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.0249200.0002
Check MTime0.00130.7771200.0001
Mysql Total
Database connection0.00060.384310.0006
Mysqli_queries0.122372.75901410.0009
Looping result0.00140.81391390.0000
Template Total0.157193.510.1571
Template load0.00070.414110.0007
Template processing0.156493.033610.1564
Override
Cache load0.00050.276810.0005
Sytem overhead
Fetch class attribute can translate value0.00080.497510.0008
XML
Image XML parsing0.00030.169710.0003
General
dbfile0.00321.9233200.0002
String conversion0.00000.002330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs