eZ Community » Forums » General » Clear cache in multi siteaccess...
expandshrink

Clear cache in multi siteaccess sharing same var dir

Clear cache in multi siteaccess sharing same var dir

Monday 04 June 2012 12:45:30 pm - 1 reply

Hello,

Does clearing the cache for a siteaccess in a multi-site environment sharing the same var dir clears the cache of others ?

If yes is there a way in such architecture to do selective cache clearing ?

Thank you in advance.

Cheers

Monday 04 June 2012 2:43:43 pm

Hi,

maybe there is a solution for it ( not tested yet )

For example:

You have 1 DB with 4 sitaccesses

- admin, sa1, sa2, sa3

And now you want to clear the cache only for sa2.

Than you could configure your sa2  (site.ini.append.php)

 

 [SiteAccessSettings]

# A list of related siteaccesses sharing the same database
RelatedSiteAccessList[]
RelatedSiteAccessList[]=sa2

 

 

Now you can clear the cache for sa2 on the commandline. Noc cache for admin, sa1 and sa2 will be cleared. (This should work, not tested yet blunk.gif Emoticon )

cd /path/to/ezpublish;
 ./bin/php/ezcache.php --clear-all --purge -s sa2

 

The admin site.ini.append.php should be

 

 [SiteAccessSettings]

# A list of related siteaccesses sharing the same database
RelatedSiteAccessList[]
RelatedSiteAccessList[]=admin
RelatedSiteAccessList[]=sa1
RelatedSiteAccessList[]=sa2
RelatedSiteAccessList[]=sa3

Now you can clear the cache for admin, sa1, sa2 and sa3 on the commandline or over the admin interface

cd /path/to/ezpublish;
./bin/php/ezcache.php --clear-all --purge -s admin;

Hopefully this will help you.

 

Note: if you clear the image cache this will clear the cache for all sitaccesses, because this cache is stored in the database

 

 

Cheers Felix

Modified on Monday 04 June 2012 2:48:03 pm by Felix Woldt

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from