Share » Forums » Developer » Caching problems

Caching problems

Caching problems

Saturday 06 October 2007 5:09:50 am - 8 replies

Author Message

Petr Mifek

Saturday 06 October 2007 9:32:24 am

At first sight, I think the ini should be either in the siteaccess, where the news doesn't showed up, or in the override. The admin siteaccess is problably not the right place for this. There may be additional problems in the config, but this one is obvious after brief reading your message.

Good luck!

Damien Pobel

Saturday 06 October 2007 3:41:19 pm

Hi,

I think Petr is right, you should put your viewcache.ini.append.php in settings/override instead.
But if your lmi_news on the homepage are shown using the pagelayout templates (or an include in it) the Smart Cache Clear will not solve your problem as it only concerns the cache of $module_result.content [1].
If you have a cache-block around the template code that fetch your lastest lmi_news you should check the subtree_expiry parameters of cache-block [2].
You can find a good example in "eZ Publish Performance Optimization Part 3 of 3: Practical Cache and Template Solutions" [3]

[1] http://ez.no/doc/ez_publish/technical_manual/3_9/features/view_caching
[2] http://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_functions/miscellaneous/cache_block
[3] http://ez.no/developer/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Oliver Frommel

Sunday 07 October 2007 1:23:56 am

hmm, I had the same settings in the regular siteaccess before and it didn't work. So i tried to put it in the admin access as described here:

"make sure the "viewcache.ini.append.php" file located in the "settings/siteaccess/example_admin" directory (replace "example_admin" by the name of the siteaccess that is used for adding and editing content) contains the following lines:
[ViewCacheSettings]SmartCacheClear=enabled"
http://ez.no/doc/ez_publish/technical_manual/3_9/features/view_caching/smart_view_cache_cleaning

This also seems to make sense, so i tried it. However I had no success with both approaches.

Thanks for your hints
Oliver

Xavier Serna

Monday 08 October 2007 12:34:53 am

Hi all,

the viewcache settings must be set in the siteaccess used to publish content (usually admin siteaccess). And in the AdditionalObjectIDs array I believe that must be specified the ObjectID of the home, not the NodeID.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Petr Mifek

Monday 08 October 2007 12:57:01 am

Xavier is right. Today I've checked some our configs and it the problem seems to be in the >Object<ID. I've been thinking in multisite-ezwebin's context... Sorry for misguiding you.

Good luck!

Oliver Frommel

Tuesday 09 October 2007 4:50:29 am

Ok, I guess using the admin site access and object ID will be ok. Thanks for your help.

However it still doesn't work although I tried virtually every combination of settings in the viewcache.ini and different cache-blocks in the template. For instance using a {cache-block expiry=120} around the template fetch and display code for the news items as a brute force approach didn't work either.

Could it be a problem with our setup? With this site we have two different site accesses 'sa1' and 'sa2' sharing the content and most of the templates, too. The templates for the homepage differ though. That means we have two templates 'startpage1.tpl' (for sa1) and 'startpage2.tpl' (for sa2). We have only one admin site access for both sites - and thus only one viewcache setting as well. Is it possible that the caching of one site access intereferes with the other?

I tried both, using the same cache directory for both sites (say var/cache_sa1), and using a separate cache directory each site (say var/cache_sa1 and var/cache_sa2). What is the right approach?

Thanks
Oliver

Xavier Serna

Tuesday 09 October 2007 7:21:01 am

What eZ version are you trying with? Forgot to mention that AdditionalObjectIDs settings is available only in >3.9.0.

Also, along with the AdditionalObjectIDs setting you must specify the clearcachemethod, in your case 'object' would be ok.

And, for the var/cache issue, if both siteaccess are sharing the same db, it's ok to use the same var dir, not sure but perhaps for all this to work, this is a must.

More info can be found here:
http://ez.no/doc/ez_publish/technical_manual/3_9/features/view_caching/smart_view_cache_cleaning

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Oliver Frommel

Tuesday 09 October 2007 9:30:26 am

This is all fine and dandy: We are using eZ Publish 3.9.2.

I also read the documentation you pointed me too but still don't get it :) In my opinion the docs should be a bit more clear, maybe even more formal to point out what directives are required and which are optional and which combinations are, too.

For instance if you take a look at Example 5 you will see that they are using the AdditionalObjectIDs without a clearcachemethod. It might be somewhere else in the imaginary ini file buw how knows. Or am I missing something?

Anyway thanks a lot for your help.
Oliver

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu