Forums / Setup & design / No Cache Settings work

No Cache Settings work

Author Message

Matthias Wittwer

Wednesday 09 January 2008 5:27:06 am

Hello all,
I am working with 3.9.3 and want to use view_parameters.
But the pages are ALWAYS cached and I do not know why.

neither

ViewCaching=disabled
in site.ini.append

nor

{set-block scope=root variable=cache_ttl}0{/set-block}

nor

{cache-block expiry=1}
{$view_parameters.component}
{$view_parameters|attribute('show')}
{/cache-block}

works...
I have to clear the Cache in the backend always manually

Anyone a idea?

any help highly appreciated.

kind regards,
Matthias

André R.

Wednesday 09 January 2008 10:18:40 am

How are the url's (with view parmeters) you are trying look like?
In what template are you doing this (full path)?
Did you place the view cache setting in settings/override/site.ini.append.php?
If you open admin and goes to setup -> ini setting what does it say on that setting?

If it still doesn't work try updating to 3.9.4 or stable/3.9.

btw, newer use cache-blocks in the way you use it in your third example, you are basically caching a very small piece of code that are not even fetching or calculation any thing for the extremely long length of 1 second.
I guess you though it would force the content to be updated every 1 second. But it won't if that code is inside another cache-block or inside a node/object template with viewcache enabled.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Matthias Wittwer

Thursday 10 January 2008 12:34:47 am

Hello André,
thanks for the help, I appreachiate that.

it took me almost a whole day, but the problem was:
in the default pagelayout there is a cacheblock around the $module_result.

{cache-block keys=array($uri_string, $basket_is_empty, $user_hash)}

Pages were not cached with ViewCaching disabled,
just the $view_paramters weren't refreshed when coming the second time to the page.

problem solved.

Sergei Chusmah

Friday 04 April 2008 2:54:01 am

I have a similar problem... I have a form which I'm trying to pre-populate with the current user id.
It works, but the contents are cached, and it always displays the same user id, regardless of the current logged in user!

I've tried several of these solutions (cache-block expiry, set-block ttl, etc...), with no luck. My template is this one...

{default content_object=$node.object
         content_version=$node.contentobject_version_object
         node_name=$node.name
         current_user=fetch('user', 'current_user')}

... form fields including $current_user.login ...

...which is called from another template, this way:

{let form=fetch('content', 'node', hash('node_id', 10091))}
{section show=$form}
{node_view_gui view=full content_node=$form}
{/section}
{/let}

I'm using 3.6.5... Any hint would be appreciated, thanks!

André R.

Friday 04 April 2008 3:37:39 am

And where / what is this 'another template' ?
It is 99.99% + 0.01% probability that it is inside a cache-block or the code is in a node template( witch uses view cache by default).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Sergei Chusmah

Friday 04 April 2008 4:02:38 am

You're right, it is a node template, but then, how can I disable the cache for that node alone?
Is that possible? Of course, disabling the cache for the whole site is not an option...
Thanks for your help.

Sergei Chusmah

Monday 07 April 2008 4:15:09 am

I've been searching for docs on the cache systems, and found that I can clear a node's cache with this:
php ./bin/php/ezcontentcache.php --clear-node=<node-number>

But that's not a solution for my problem either... I'd have to run this script everytime!

What I need is a form where the current logged in user id is sent in the email. I have set up the form as a node with collection information fields (as in the docs), one of which will hold the user id.

But the caching system makes this field to be always the same... I know there must be a simple solution for this! Any hint? Thanks!

André R.

Sunday 11 May 2008 6:15:46 am

In the form template (normally override/templates/full/<class_identifier>.tpl witch means it is a node view full template) add this:

{set-block scope=global variable=cache_ttl}0{/set-block}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Daniele Nocentini

Monday 12 May 2008 2:16:18 am

what this difference between this codes:

{set-block scope=root variable=cache_ttl}0{/set-block}

and

{set-block scope=global variable=cache_ttl}0{/set-block}

Antica Bottega Digitale srl
http://www.abd.it

André R.

Monday 12 May 2008 9:11:15 am

The variable scope.

Global means the global scope, while root means the scope you are currently in.
Every template you includes create a new variable scope, so it wont workj if you try to set cache_ttl in a included file and not directly in the node view full template and use scope=root.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 18 2025 15:54:43
Script start
Timing: Jan 18 2025 15:54:43
Module start 'content'
Timing: Jan 18 2025 15:54:44
Module end 'content'
Timing: Jan 18 2025 15:54:44
Script end

Main resources:

Total runtime0.8049 sec
Peak memory usage4,096.0000 KB
Database Queries219

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.7031180.8438
Module start 'content' 0.00630.6742 768.5469714.3438
Module end 'content' 0.68050.1244 1,482.8906344.4453
Script end 0.8048  1,827.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.5901210.0002
Check MTime0.00170.2084210.0001
Mysql Total
Database connection0.00050.059910.0005
Mysqli_queries0.710588.26932190.0032
Looping result0.00200.24692170.0000
Template Total0.779396.820.3897
Template load0.00180.228920.0009
Template processing0.777596.593720.3887
Template load and register function0.00020.019810.0002
states
state_id_array0.00070.087510.0007
state_identifier_array0.00070.085620.0003
Override
Cache load0.00170.2076740.0000
Sytem overhead
Fetch class attribute can translate value0.00140.179850.0003
Fetch class attribute name0.00130.1665120.0001
XML
Image XML parsing0.00260.328650.0005
class_abstraction
Instantiating content class attribute0.00000.0035150.0000
General
dbfile0.00931.1564340.0003
String conversion0.00000.000730.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 57
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs