Forums / Setup & design / [Resolved] Problems with ViewCaching

[Resolved] Problems with ViewCaching

Author Message

Alain Sahli

Monday 06 October 2008 1:48:22 am

Hi all,

I enabled ViewCaching in the config file <i>settings/override/site.ini.append.php</i> and since them when I modify some content through my admin siteaccess the changes didn't appear on my website.

I tried to clear all cache through the admin siteaccess but it didn't work but if I use the php script ezcache.php --clear-all the changes appaear on my website.

Thanks for help !

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Monday 06 October 2008 2:38:04 am

Make sure site.ini [SiteAccessSettings]RelatedSiteAccessList[] is set correctly.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Alain Sahli

Monday 06 October 2008 3:56:08 am

I have 4 siteaccesses so I put this in <i>settings/override/site.ini.append.php</i>

RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=ger
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=wess_admin

But it doesn't work better...

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Monday 06 October 2008 5:45:53 am

Then it could be access rights, but difficult to say without knowing the setup.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Alain Sahli

Tuesday 07 October 2008 12:38:01 am

I checked the access right and www-data has full access (777) on the var folder. It's really strange :-(

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Tuesday 07 October 2008 1:15:12 am

var folder is one thing, to really check though you'll need to check the rights on the actual view cache files, located in var/<site_name>/cache/content/<siteaccess>/*.cache

To rule out a couple of pit falls you could try to clear the cache from the front end, typing in the /setup/cache url manually while logged in as admin.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Alain Sahli

Tuesday 07 October 2008 8:33:32 am

<i>var/<site_name>/cache/content/<siteaccess>/*.cache</i> I checked this file and www-data has rw access, so it should be ok.

<i>To rule out a couple of pit falls you could try to clear the cache from the front end, typing in the /setup/cache url manually while logged in as admin.</i>

I tried it and it works ! Why is this working on the front-end but not in back-end ?

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Tuesday 07 October 2008 9:29:54 am

well there could be many different thing, is viewcache disabled in admin part?(but you would have noticed that, since the view cache check box would have been disabled in setup/cache) do they share the [FileSettings]VarDir setting? and are you sure there isn't anything wrong with the RelatedSiteAccessList setting?

Post your override/site.ini.append.php file (but without the sensitive parts like db settings and site name/url/domain).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Alain Sahli

Tuesday 07 October 2008 11:56:15 am

I have a folder for each siteaccess in the var folder (var/fre, var/ger, var/eng and var/wess_admin).

View cache is enabled in the admin part.

<?php /* #?ini charset="utf-8"?

[ExtensionSettings]
ActiveExtensions[]=ezdhtml
ActiveExtensions[]=ezodf
ActiveExtensions[]=smileclasses
ActiveExtensions[]=wess

[Session]
SessionNameHandler=custom

[SiteSettings]
DefaultAccess=fre
SiteList[]=fre
SiteList[]=ger
SiteList[]=eng
SiteName=Web Engineering Sahli & Stalder
MetaDataArray[author]=Web Engineering Sahli & Stalder
MetaDataArray[copyright]=Web Engineering Sahli & Stalder
MetaDataArray[description]=Entreprise de création de site web
MetaDataArray[keywords]=cms, publish, e-commerce, ez publish, site, internet
SiteURL=www.wess.ch/

[SiteAccessSettings]
RemoveSiteAccessIfDefaultAccess=enabled
CheckValidity=false
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=ger
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=wess_admin
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=ger
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=wess_admin
ForceVirtualHost=true
MatchOrder=uri
HostMatchMapItems[]

[InformationCollectionSettings]
EmailReceiver=xxxx@wess.ch

[MailSettings]
AdminEmail=xxxx@wess.ch
EmailSender=xxxx@wess.ch
Transport=SMTP
TransportServer=xxxx
TransportPort=25
TransportUser=xxxx@wess.ch
TransportPassword=xxxxxx
ContentType=text/html

[DebugSettings]
DebugOutput=disabled
DebugRedirection=disabled

[TemplateSettings]
Debug=disabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled
TemplateCache=enabled

[DatabaseSettings]
SQLOutput=disabled

[ContentSettings]
ViewCaching=enabled
*/ ?>

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Tuesday 07 October 2008 12:42:19 pm

> I have a folder for each siteaccess in the var folder (var/fre, var/ger, var/eng and var/wess_admin).

This is the reason then, related siteaccess need to share var folder to be able to expire view cache and some other caches.
But you can't just merge the var folders though, because you'll have to fix the path of images / files that has been uploaded in the fre/eng/ger siteaccesses(if you merge them with the wess_admin var folder).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Alain Sahli

Tuesday 07 October 2008 11:35:57 pm

Thanks André ! It works :-)

But can you please explain why the cache must be in the same folder ?

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

André R.

Wednesday 08 October 2008 12:20:42 am

Simple: When your doing something that triggers cache clear when you are in your admin siteaccess it will clear it's cache in the var/<site_name>/cache/* folders, where site name is taken from the ini settings you are currently using (settings for this siteaccess). Additionally it will try to clear cache for the related siteaccess on cache types that stores it's cache pr siteaccess(the sub folders).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 18 2025 15:07:22
Script start
Timing: Jan 18 2025 15:07:22
Module start 'content'
Timing: Jan 18 2025 15:07:23
Module end 'content'
Timing: Jan 18 2025 15:07:23
Script end

Main resources:

Total runtime1.1135 sec
Peak memory usage4,096.0000 KB
Database Queries221

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 587.7344180.8281
Module start 'content' 0.01010.9756 768.5625662.6484
Module end 'content' 0.98570.1278 1,431.2109352.4609
Script end 1.1135  1,783.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3653210.0002
Check MTime0.00150.1315210.0001
Mysql Total
Database connection0.00120.109810.0012
Mysqli_queries1.015091.15082210.0046
Looping result0.00220.20032190.0000
Template Total1.080397.020.5402
Template load0.00220.201920.0011
Template processing1.078196.815620.5390
Template load and register function0.00010.008610.0001
states
state_id_array0.00120.104910.0012
state_identifier_array0.00090.082020.0005
Override
Cache load0.00200.1763550.0000
Sytem overhead
Fetch class attribute can translate value0.00120.108030.0004
Fetch class attribute name0.00110.0950140.0001
XML
Image XML parsing0.00140.124530.0005
class_abstraction
Instantiating content class attribute0.00010.0055240.0000
General
dbfile0.00580.5235340.0002
String conversion0.00000.000330.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
12content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
12content/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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 43
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs