[SOLVED] No Viewcache with layout/set ?

Author Message

Nick Ursa

Sunday 12 August 2007 2:08:41 pm

Hey>

I'm trying to implement an AJAZ hierarchical menu on the left that changes content on the right.
Do to this I made a different layout called 'ajax' which outputs the node without navigation etc.

A) Normal URL for a product:

http://dentsply.ca/product/552

B) Clicking a link on the left will get you just the section within the DIV on the right. An AJAX request is sent to:

http://dentsply.ca/layout/set/ajax/content/view/ajax/552

and the div is replaced with the new contents.

The problem is performance: Viewcaching works for A) but not for B). I can't figure out why.
Cache-block on URI is also impractical because the product catalogue is large enough that I can't have it wiped out all the time. And I couldn't get that to work anyway.

n.

Bruce Morrison

Sunday 12 August 2007 11:29:52 pm

Hi Nick

If you have view caching enabled the layout/set output should be cached. The layout/set module view simply internally reruns the url without the layout/set/[layoutname] after setting some parameters so the correct pagelayout is used (it's actually pretty cool how it works)

Are you sure the view cache is not being generated? You should be able to tell if you turn on debugging and access http://dentsply.ca/layout/set/ajax/content/view/ajax/552 a number of times and compare the timing table between accesses.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Damien Pobel

Monday 13 August 2007 12:41:29 am

Hi Nick,

By default, only full, sitemap and pdf views are cached. You have to add "ajax" to CachedViewModes setting in site.ini.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Bruce Morrison

Monday 13 August 2007 3:46:17 am

Doh! Great catch Damien.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nick Ursa

Monday 13 August 2007 7:26:53 am

PERFECT.

Thanks loads. Saved me hours of frustration.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.