Forums / General / How to debug cache expiration and regeneration?

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