Is there any documentation on what views caches and when and more specifically what it doesn't? If not can someone clarify what it does and doesn't cache? And if there is anyway to force views to cache something it might otherwise not?

As i use views more and more, caching seems to be a necessity.

thanks

Comments

merlinofchaos’s picture

Status: Active » Fixed

All of Views caching is internal; it caches its own data, so that it can build queries as efficiently as possible. It does not, however, cache the output of the query, at all.

newdru’s picture

Just so i follow you here.

I think what you're saying is that views only caches the 'view request' itself, which i would define as the data object that one can export using 'views export'.

however, the node result set is NOT cached correct?

if that's the case:

1) is there any way to force views to cache the result set? if so how would i do this using drupal api or some other backdoor method?

2) if not, can i assume that if my views query is based on a pure node result set from a custom cck content type, that if the cck module caches it's data (upon first db lookup request of necessary fields required to build the node), that views benefit's from this type of caching?

a simpler way to put question number 2 is does views benefit from any underlying node caching and i think the answer would be yes?

3) does cck automatically provide caching for custom content types? (couldn't find the answer)

4) is there any performance hit / gain using one type of view "display type" versus another.

what i mean is that a "node" or "teaser" type seem to use the default node.tpl.php for theming. that already exists as part of the base drupal install.

however, when you start using the 'custom' view types, you start bringing in views custom code which eventually targets custom views...tpl.php files to perform the actual presentation of the data / theming . so the question more specifically is whether or not there is more overhead using the default node / teaser view types that use node.tpl.php for output versus having to route through customized views functions and corresponding templates.

note: i know that performance hit will sometimes depend on whether you're building a grid, versus a teaser, versus full nodes. i know that's hard to quantify and i'm not asking that. i'm just asking about the *overhead* views uses to on a basic node.tpl.php versus if extra "scaffolding" needs to be called to use the other view types. hope that makes sense.

thanks

newdru’s picture

Status: Fixed » Active
EvanDonovan’s picture

Is it possible to turn off Views caching for certain things, such as CCK fields or taxonomy vocabularies? If you've created a lot of them it seems to degrade performance.

Or is this so deep in the code that there's no way to separate it out?

domesticat’s picture

Status: Active » Closed (fixed)

Performing a mass closing of all issues over 180 days old. Please reopen if needed.

giorgio79’s picture