Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2007 at 21:22 UTC
Updated:
16 Dec 2009 at 13:50 UTC
Comments
Comment #1
soupp commentedThe solution I found http://drupal.org/project/cacheexclude
But it's only partial. It excludes the page but it does not work for block.
The result is here: http://www.drupalsites.net/random
Comment #2
merlinofchaos commentedViews does not do any content caching of its own. I believe you must be talking about the page cache, but page caching happens at a level that Views cannot control. There isn't anything Views can do about this.
In particular, if you have a block that needs to be different very page load, you basically cannot use page caching.
Comment #3
soupp commentedThanks merlinofchaos. Your post just proved I'm not missing anything now.
Actually I was talking about both: page and block. But as long as block is a part of html output for a page I see now that the block can't be (non/re)cached individually not depending on the whole page.
The situation is a bit tricky with views blocks with random sorted content... but it is really by design. So it's or performance or more dynamic content.
Comment #4
kanani commentedOne of the ways I handled this was to:
It gracefully degrades as well. If javascript is enabled, you get the noncached content, if its disabled, you get the cached results.
I'm loading it into a div in a page, but there's no reason you couldn't load it into a block.
Module code:
Javascript code:
Comment #5
Marko B commentedNice solution kanani!