eZ Community » Forums » Setup & design » [SOLVED] No Viewcache with layout/set ?
expandshrink

[SOLVED] No Viewcache with layout/set ?

[SOLVED] No Viewcache with layout/set ?

Sunday 12 August 2007 11:08:41 pm - 4 replies

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.

Modified on Monday 13 August 2007 4:28:17 pm by Nick Ursa

Monday 13 August 2007 8:29:52 am

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

Monday 13 August 2007 9: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.

Monday 13 August 2007 12:46:17 pm

Doh! Great catch Damien.

Cheers
Bruce

Monday 13 August 2007 4:26:53 pm

PERFECT.

Thanks loads. Saved me hours of frustration.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu