---
title: "Views caching"
date: "2024-02-14T06:18:38+00:00"
summary: "Optimize Drupal Views performance with time-based caching. Learn how to reduce database queries and improve site speed."
image:
type: "page"
url: "/resources/views-caching"
id: "a3bdfbe0-1c30-4534-a7d3-3588541e1903"
---

The [Views](https://www.drupal.org/project/views) module is a query builder. Any view the module creates queries your database one or more times. Creating views can result in a large number of database queries for any given page load.

By default, Views does not cache any of its queries or data. While Drupal’s page caching will mask some of the problem, websites with a large amount of traffic coming from authenticated users will see heavier load unless you cache the views.

Setting up view caching
-----------------------

You can start caching your views by setting up time-based caching on any view displayed on a routine basis.

To set up caching for a view:

1.  Sign in to your website, and go to **Structure** > **Views**.
2.  Find the view you want to configure, and then click its **Edit** link.
3.  In the **Advanced** settings section, click `None` next to **Caching**.
    
    ![View caching](https://acquia.widen.net/content/gimz4o2sha/jpeg/resources_view-caching.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
4.  Select **Time-based**, which gives you the opportunity to cache query results or rendered output.
5.  Click **Apply** to save the new caching value.
6.  Click **Save** to save the edits to your view.

You must consider settings individually per view. Even a five-minute cache can make a significant difference in website performance.

If you need more control over when the cache for each view clears, and do not want to set up the [Rules](https://www.drupal.org/project/rules) and [Acquia Purge](https://drupal.org/project/acquia_purge) modules to clear caches based on rules, consider the [Views content cache](https://www.drupal.org/project/views_content_cache) module to set up per-view cache clears when you add content of certain types to the database.

Additional caching information
------------------------------

For more information about caching on your Drupal website, see [Caching overview](/caching).