Forums / Developer / Ezflow block and view cache : clear view cache when publishing current object

Ezflow block and view cache : clear view cache when publishing current object

Author Message

Abdelkader RHOUATI

Wednesday 22 September 2010 8:28:48 am

Hi,

My site is developped using ezpublish 4.1.4, and ezflow.

On the homepage, I have a block That fetches a list of news. Whene I update a news in a BO, I want to see my modif without clearing cache(cache content)
When the news has changed, and publishing only his viewcache will be clearing and not that of the homepage.
I saw the file configruation viewcaching.ini, I thought i can find the solution in the parameter,

[ViewCacheSettings]
ClearRelationTypes[]=

But nothings work !

Aany suggestions ?

Tks

(Sorry for my english)

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Jean Voye

Wednesday 22 September 2010 9:33:13 am

Hello sir,

For any of the directives in [ViewCacheSettings] to be taken into account, the smart cache clearing system must first be enabled :

[ViewCacheSettings]
SmartCacheClear=enabled

Much of a sanity check, but worth checking :)

Let us know !

--
Nicolas

Abdelkader RHOUATI

Wednesday 22 September 2010 9:39:49 am

@Jean, tks for reply :)

here is my configuration:

[ViewCacheSettings]
ClearRelationTypes[]=common
ClearRelationTypes[]=reverse_common
ClearRelationTypes[]=reverse_embedded
ClearRelationTypes[]=reverse_attribute
SmartCacheClear=enabled

And it's not work.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Sébastien Morel

Wednesday 22 September 2010 3:08:14 pm

Hi,

I am not an expert on eZ Flow (I do not often used ...), but what is the type of relationship your object "news" has with your home page. Is there one? (in tab relationship?)
If none, it's normal that it doesn't clear the cache with the rules in viewcache.ini.

Is it possible that the block does not place objects on reverse relation it back, or even on the block itself ? (you have to check this)
It is less clean but you can also use:

[News]
AdditionalObjectIDs [] = id of you home

++

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Jean Voye

Thursday 23 September 2010 1:38:18 am

Hi again,

I just tested the use case on a Fuji beta3, and it works fine. I do have the same issue though : on the local version of share.ez.no (4.2, ezflow 2.0)

Having scanned the eZ Flow changelogs since version 1.1, i could not find any relevant issue or enhancement request that would explain or give a hint on the issue you have. I think this would deserve an issue report, with a thorough description and statement of versions (ezpublish, ezflow). You may also want to add a link back to this thread.

Cheers !

--
Nicolas

Abdelkader RHOUATI

Thursday 23 September 2010 4:34:07 am

@Jean, i just add an issue about this, see http://issues.ez.no/IssueView.php?Id=17324&activeItem=1

@Sébastien,

" It is less clean but you can also use:

[News]
AdditionalObjectIDs [] = id of you home"

A home page is just an example, i have several others page with the same case, and also admin user can create a new content with block ezflow... So your suggestion does not satisfied my need :(

TKS

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Abdelkader RHOUATI

Thursday 23 September 2010 4:40:48 am

Otherwise, can any one, explains how a view cache is cleaning, when object is published ?

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

eZ debug

Timing: Jan 29 2025 13:46:13
Script start
Timing: Jan 29 2025 13:46:13
Module start 'content'
Timing: Jan 29 2025 13:46:13
Module end 'content'
Timing: Jan 29 2025 13:46:13
Script end

Main resources:

Total runtime0.2405 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.4453180.7813
Module start 'content' 0.00630.0053 770.2266102.2422
Module end 'content' 0.01160.2288 872.4688530.7500
Script end 0.2404  1,403.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.3843200.0002
Check MTime0.00130.5558200.0001
Mysql Total
Database connection0.00110.446710.0011
Mysqli_queries0.200583.39311410.0014
Looping result0.00100.42491390.0000
Template Total0.228595.010.2285
Template load0.00080.330610.0008
Template processing0.227794.677410.2277
Override
Cache load0.00050.225010.0005
Sytem overhead
Fetch class attribute can translate value0.00070.305310.0007
XML
Image XML parsing0.00030.120610.0003
General
dbfile0.00381.5928200.0002
String conversion0.00000.001630.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs