ezsystems/ezpublish — pull request #499 by edorfaus (2012-11-16 11:10:23+00:00)
Title: Fix for view cache clear on publish with many related siteaccesses.

If an eZ Publish site has too many related siteaccesses, publishing a content object does not clear the object's view cache for any siteaccess, including the siteaccess doing the publishing. This patch fixes the problem.

I ran into this problem on a site I'm working on, that has over 800 related siteaccesses (the site.ini [SiteAccessSettings] RelatedSiteAccessList[] setting). Tracking it down, I found this message in my warning.log:

glob(): Pattern exceeds the maximum allowed length of 4096 characters in /path/to/ezpublish/lib/ezutils/classes/ezsys.php on line 1086

and found out it is caused by eZFSFileHandler::fileDeleteByDirList() creating a single glob for all the directories given to it, which in this case is one directory for each related siteaccess.

This was first found on 4.1.1, which is where this fix has been tested, but it appears to still be an issue in master, hence this pull request.

(Note that there's a relatively simple workaround that I'm currently employing: I created a new cluster file handler class that extends eZFSFileHandler and just overrides that particular method.)