Last updated 7 August 2015. Created on 2 August 2010.
Edited by RunePhilosof, joachim, weavingmedia, mgifford. Log in to edit this page.

Views content cache is really simple to set up:

  1. Install and enable the module like any other Drupal module.
  2. Edit the view that you want to add caching to, and edit the 'Cache' property in the 'Other' pane.
  3. Choose the 'Content based' plugin.
  4. On the settings page for the cache plugin you can choose what cache segments to monitor. For example, if your view is the latest 5 blog posts, you should monitor the 'blog' node type. You should monitor any segment that you want to update your view when it is changed. This might take some trial and error to get set up correctly for you particular use case.
  5. Also on the settings pane, you can choose a minimum and maximum lifetime for your views cache. You only really need to set a minimum lifetime if your cache segments are being updated very regularly, say on a busy site where a new blog post is added every five seconds. A maximum lifetime will be useful if your view contains time sensitive data, like: 'Posted 3 hours ago' or to ensure that the data is correct, views content cache isn't perfect and the maximum lifetime allows you to ensure that at least once a day, for example, the cache is 'flushed'.
  6. That's it! Views content cache will start monitoring the cache segments and your views cache will start being used.

Looking for support? Visit the forums, or join #drupal-support in IRC.


jmpreston’s picture

We have an XML export setup in Views but this module's settings don't recognize it. We REALLY need it cached because it feeds an iPhone app and some users have to download data in low bandwidth areas. We have no exposed filters.

Chris Charlton’s picture

Need clearer details about the Node Add/Edit/Delete portion of the settings. "Allows the node segment to be refined to only include main operations" is not clear enough. Do users need to choose that option? Is there a performance issue choosing/not-choosing that checkbox, etc.

Chris Charlton
LA Drupal
Drupal Author
Published since 2007
delacosta456’s picture

hi yes i second christ about segment .. it is not clear please..
how thanks for this nice module