# Cache In Dashboard

When you create a dashboard and add a tile to it, the first query from that tile would go directly to your database. However, after every refresh, subsequent queries would come from the cache and would be faster.&#x20;

So for the first time, the query goes directly to your database, and if it gets the results back, the system would cache (store) that data. So the next time you come back to it, it’s going to be significantly faster because the data would be coming from cache instead of your database.

For example, if you add a [Line chart](/features/dashboards/charts-in-dashboard/line-chart.md) to visualize sales performance, the first query of your sales data would come directly from your database. However, when you refresh your dashboard, the data would come from the cache and you would get the result faster.

The cached data will remain and continue appearing during every refresh as long as everything remains the same. However, a new database query will occur and a new set of data will be generated from the dashboard if you make changes to the tile or if any of the elements change.

For example, if you have a [date range](/features/dashboards/dashboard-tiles.md#date-range) selected for a tile. Let’s say you are tracking sales performance for the last 7 days, every time you refresh the tile, it will pull from the database; because the ‘last 7 days’ is a rolling date range, which changes every single day.

Similarly, if you make [changes to a tile](/features/dashboards/dashboard-tiles.md#edit) in the dashboard, a new database query will occur and a new set of data will be cached to reflect your changes.

## **Refresh**

<div align="left"><img src="/files/-Mflp8ddNzbgSUlgeBBH" alt=""></div>

When you click on refresh, it makes a call to the database or the cache. If there's already cached data for each tile on the dashboard, clicking refresh will just pull that data again. However, if there's no cache data for a tile, it will make a call to the database.

{% hint style="info" %}
Note: Clicking the refresh icon would refresh all the tiles in the dashboard. Follow the steps below if you only want to refresh a specific tile.
{% endhint %}

### **Refreshing a Specific Tile**

Follow these steps to refresh a single tile:

1\. Click on the **Options icon** on that tile.

<div align="left"><img src="/files/-Mfls_J9lzjJOD5rE_bg" alt=""></div>

2\. Click on the **Refresh** option to refresh that specific tile.

## **Clear Cache & Refresh**

<div align="left"><img src="/files/-Mflp8dj4mAxTgCDDWKo" alt=""></div>

This option allows you to display a fresh/updated set of data on a tile. When you click clear cache and refresh, the cached data is erased and a new query is made to the database. This new data is then cached in place of the one erased.

{% hint style="info" %}
Note: Clicking the Clear Cache & Refresh icon would refresh all the tiles in the dashboard. Follow the steps below if you only want to refresh a specific tile.
{% endhint %}

###

### **Clear Cache & Refresh a Specific Tile**

Follow these steps to clear cache & refresh a single tile.

1\. Click on the **Options icon** on that tile.

<div align="left"><img src="/files/-Mfls_J9lzjJOD5rE_bg" alt=""></div>

2\. Click on the **Clear Cache & Refresh** option to refresh that specific tile.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foxmetrics.com/features/dashboards/cache-in-dashboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
