How to debug cache expiration and regeneration?

Author Message

Christian Johansen

Tuesday 29 August 2006 4:57:30 am

I'm having some trouble - my caches are not updated. Everything looks right but still I get no updates. How can I debug this process to monitor how eZ decides to refresh my caches or not, and which caches it touches?

In case someone spots something wrong here please do tell me, I'm clueless.

CacheThreshold - can it be this one that's ruining it for me? Does CacheThreshold=60 imply that cache cleanup will not happen if more than 60 nodes are affected?

My install is eZ P 3.8.1

(I took these settings from the admin to be sure I get the settings eZ is actually using, not just those I want it to use)

site.ini

[ContentSettings]
CacheDir=cache
CachedViewModes=full; sitemap; pdf
CachedViewPreferences[full]=admin_navigation_content=0;admin_navigation_details=0;admin_navigation_languages=0;admin_navigation_locations=0;admin_navigation_relations=0;admin_navigation_roles=0;admin_navigation_policies=0;admin_navigation_content=0;admin_navigation_translations=0;admin_children_viewmode=list;admin_list_limit=1;admin_edit_show_locations=0;admin_leftmenu_width=10;admin_url_list_limit=10;admin_url_view_limit=10;admin_section_list_limit=1;admin_orderlist_sortfield=user_name;admin_orderlist_sortorder=desc;admin_search_stats_limit=1;admin_treemenu=1;admin_bookmarkmenu=1;admin_left_menu_width=13
CacheThreshold=60
PreViewCache=enabled
PreCacheSiteAccessArray[]=admin
PreCacheSiteAccessArray[]=base
PreviewCacheUsers[]=anonymous
StaticCache=disabled

[FileSettings]
CacheDir=cache

[OverrideSettings]
Cache=enabled

[RSSSettings]
CacheTime=1200

[RegionalSettings]
TranslationCache=disabled (It's a monolingual site)

[RoleSettings]
EnableCaching=true
UserPolicyCache=enabled

[TemplateSettings]
NodeTreeCaching=disabled
TemplateCache=enabled

viewcaching.ini

[ViewCacheSettings]
SmartCacheClear=enabled
MaxOffset=3 (What does this do?)

And an example (I have blocks similar to this for all my content types)

[comment]
DependentClassIdentifier[]=article
ClearCacheMethod[]=object
ClearCacheMethod[]=parent
MaxParents=1

content.ini

[VersionView]
AvailableSiteDesignList[]=mysite2
AvailableSiteDesignList[]=admin

My siteaccess is called mysite and the design is called mysite2, that shouldn't be a problem should it?

Caches are created correctly when the page is first visited (I don't want to wait for pregeneration when publishing). The problem is that the cache is not cleared when publishing.

Update: Some more testing revealed som strange facts. Posting a comment to an article from the public site cleares the cache for all users (and thereby functions correctly). Moving to the admin - if I delete the comment here the public site is not updated. I then tried Content - Node - Clear cache from the admin - still no progress. I then did Content - Subtree both from the article and the folder above it, still no luck. Lastly I did Content - Clear Cache and it finally updated. What's going on?

Kristof Coomans

Tuesday 29 August 2006 5:15:29 am

Hi Christian

Does CacheThreshold=60 imply that cache cleanup will not happen if more than 60 nodes are affected?

If there are more than 60 nodes, view cache will be globally expired.

Did you configure the [SiteAccessSettings].RelatedSiteAccessList array setting in site.ini.append.php of your site accesses?

I also recommend to upgrade to ez. 3.8.3, there have been fixed a lot of important bugs since 3.8.1, also one regarding the content cache: http://ez.no/bugs/view/8617

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Christian Johansen

Tuesday 29 August 2006 5:44:00 am

I'll look into updating to eZ P 3.8.3, but it is not something I have time to do right now. The cache has been behaving normally with 3.8.1 on other installations as well as earlier on the same site.

[SiteAccessSettings].RelatedSiteAccessList is not configured, and alas, not documented either. What does it do? Do I need to add my public siteaccess to this setting in the admin siteaccess settings? I thought this connection was established by [VersionView].AvailableSiteDesignList ?

Kristof Coomans

Tuesday 29 August 2006 6:43:06 am

Take a look at this topic:
http://ez.no/community/forum/setup_design/viewcaching_makes_problems_when_changing_priority

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Christian Johansen

Tuesday 29 August 2006 11:42:50 pm

Ah, thanks yet again Kristof! As far as I could gather It was the undocumented RelatedSiteAccessList[] combined with a small bug in 3.8.1that threw me off. It's working now, thanks alot!

Svitlana Shatokhina

Friday 20 October 2006 5:14:05 am

Hi,

There was a question about MaxOffset=3, please note that this setting is not in use. "MaxOffset" was renamed to "MaxParents" long time ago (stable/3.4 rev. 8140, stable/3.5 rev. 8141).

Best regards,
Sveta

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 06:13:13
Script start
Timing: Jan 19 2025 06:13:13
Module start 'layout'
Timing: Jan 19 2025 06:13:13
Module start 'content'
Timing: Jan 19 2025 06:13:13
Module end 'content'
Timing: Jan 19 2025 06:13:13
Script end

Main resources:

Total runtime0.5685 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.2813152.6406
Module start 'layout' 0.00590.0030 741.921939.4766
Module start 'content' 0.00890.5582 781.3984615.2422
Module end 'content' 0.56710.0014 1,396.640616.1250
Script end 0.5685  1,412.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.6177160.0002
Check MTime0.00150.2633160.0001
Mysql Total
Database connection0.00080.149110.0008
Mysqli_queries0.509489.5947680.0075
Looping result0.00070.1187660.0000
Template Total0.534093.920.2670
Template load0.00210.375520.0011
Template processing0.531993.551720.2659
Template load and register function0.00030.044010.0003
states
state_id_array0.00150.257710.0015
state_identifier_array0.00130.235520.0007
Override
Cache load0.00180.3167400.0000
Sytem overhead
Fetch class attribute can translate value0.00070.123330.0002
Fetch class attribute name0.00130.237170.0002
XML
Image XML parsing0.00060.107430.0002
class_abstraction
Instantiating content class attribute0.00000.003780.0000
General
dbfile0.00170.3062160.0001
String conversion0.00000.001440.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs