Forums / Developer / related object cache not cleared when adding location

related object cache not cleared when adding location

Author Message

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

Marko Žmak

Wednesday 27 July 2011 1:20:12 am

"

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 ;-)

"

I suspected I would get an answer like this... :)

But, look at this logic:

  • when I add a user under AUTHORS I'm changing something about this user object so this triggers the cache clearing mechanism for the parents of the user
  • since the AUTHORS now is a parent of the user object, it's cache clearing mechanism is tiggered
  • and since I enabled reverse_attribute clear relation type, the cache clearing for AUTHORS should trigger the cache clearing for the Blog frontpage

It sounds logical to me...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Gaetano Giunta

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.

Principal Consultant International Business
Member of the Community Project Board

eZ debug

Timing: Jan 17 2025 21:02:08
Script start
Timing: Jan 17 2025 21:02:08
Module start 'content'
Timing: Jan 17 2025 21:02:09
Module end 'content'
Timing: Jan 17 2025 21:02:09
Script end

Main resources:

Total runtime0.8085 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 597.6094180.8203
Module start 'content' 0.00670.7062 778.4297615.5313
Module end 'content' 0.71290.0956 1,393.9609336.9766
Script end 0.8084  1,730.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4116210.0002
Check MTime0.00120.1497210.0001
Mysql Total
Database connection0.00080.094410.0008
Mysqli_queries0.742291.79711970.0038
Looping result0.00150.18671950.0000
Template Total0.784597.020.3923
Template load0.00170.209520.0008
Template processing0.782896.826120.3914
Template load and register function0.00010.014210.0001
states
state_id_array0.00090.108110.0009
state_identifier_array0.00080.099720.0004
Override
Cache load0.00150.1850390.0000
Sytem overhead
Fetch class attribute can translate value0.00080.100130.0003
Fetch class attribute name0.00100.120060.0002
XML
Image XML parsing0.00120.147230.0004
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00260.3254350.0001
String conversion0.00000.000630.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
4content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
2content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 11

Time used to render debug report: 0.0001 secs