Forums / Setup & design / [Resolved] Problems with ViewCaching
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
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[]=engRelatedSiteAccessList[]=wess_admin
But it doesn't work better...
Monday 06 October 2008 5:45:53 am
Then it could be access rights, but difficult to say without knowing the setup.
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 :-(
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.
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 ?
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).
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, Exponential, 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 */ ?>
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).
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 ?
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).