Forums / Developer / related object cache not cleared when adding location
Marko Žmak
Tuesday 26 July 2011 6:58:56 am
This is the situation...
I have enabled:
ClearRelationTypes[]=reverse_attribute
I have an object called "Blog frontpage" that has an object relation attribute "Map of authors". This attribute is connected to a folder called "AUTHORS".
I have a user group with users. When I go to a user and add him to the folder AUTHORS (with "Add Location"), the cache for "Blog frontpage" doesn't get cleared (while it should).
And when I (for the same user) remove the "AUTHORS" location, the cache does get cleared.
Is this a bug and can someone confirm it's happening?
I'm using eZP community 2011.6
-- Nothing is impossible. Not if you can imagine it! Hubert Farnsworth
Gaetano Giunta
Tuesday 26 July 2011 11:56:22 am
"When I go to a user and add him to the folder AUTHORS (with "Add Location", the cache for "Blog frontpage" doesn't get cleared (while it should)."
Not sure it should expire. You're not modifying the object that is related to your blog, but one of its children...
I am in fact more surpries about the cache getting cleared when you remove the user from teh AUTHORS folder ;-)
Principal Consultant International Business Member of the Community Project Board
Wednesday 27 July 2011 1:20:12 am
I suspected I would get an answer like this... :)
But, look at this logic:
It sounds logical to me...
Wednesday 27 July 2011 6:18:22 am
But you need to take into account recursion: if you expire the cache of the parent node in a recursive manner, he will expire his own parent and so on...
I'm not really sure this is clear cut, but whenever a node (other than the currently edited one) is expired based on either standard expiry rules or smart view cache ones, eZ does not recurse cache expiration.