Views has a very granular caching system, down to the individual View display. There's no single control that will just turn on views caching, and the caching is off by default. There are three different kinds of user-configurable caching within Views:
- Query Results Caching
Raw Query Results, which should be cached for at least 1 minute. As the subject matter expert, you're in the best position to know how often your content should change.
- Rendered Output Caching
Generated markup, which should be cached for as long as possible (if the query changes, the output will be refreshed).
- Block Caching
If you're generating a block, this will expose the block to Drupal's built-in block caching.
Edit the View in question.
Select the display and click Advanced.
Click the option next to Caching.
Choose Time-Based Caching and click Apply.
Rendered output: (something other than Never Cache)
Query results: (something other than Never Cache)
- Go to
- Edit the View in question.
- Select the block display and click Advanced.
- Click the option next to Block Caching.
- Block Caching Type: Choose an option for Drupal's built-in block caching method.
You can force caching for all your views using a module like Views cache bully.
You can replace the hard-coded cache tag with a form that allows developers to set different cache tags based on configuration of the view using a module like Views Custom Cache Tags.