# Cache

## Introduction

To help improve system response and minimize bandwidth usage, e107 has a built-in cache system.&#x20;

A cache could be described as a temporary memory. Each time a page is accessed, the database is queried (information is looked up or stored for example). The results of a query to the database are held in a temporary file for re-use rather than constantly looking up the results from the database. This will vastly improve speed on your site and minimize the number of calls to the database.

The cache system settings can be accessed by going *Admin Area > Settings > Cache*.&#x20;

{% hint style="info" %}
When the cache is enabled, major changes to your website may not be visibly reflected immediately. In this case, to see the changes instantly, [clear](/administration/settings/cache.md#clearing-caches) and [disable](/administration/settings/cache.md#enabling-and-or-disabling-caches) the cache before you start your changes.&#x20;
{% endhint %}

{% hint style="warning" %}
**For developers:** if you are developing your own theme or plugin, it is best to turn caching **off.** Otherwise any changes you make will not be reflected immediately.
{% endhint %}

## Caches

There are five different caches:

| Cache name         | Description                                                                                                                                                                                         |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content Cache      | The C*ontent Cache* contains page rendered content. This includes any content (html) that you see rendered on your website.                                                                         |
| System Cache       | The *system Cache* contains system configuration information. This includes site preferences, currently active menus, and so on. No actual content will be contained here.                          |
| JS/CSS Cache       | The *JS/CSS Cache* contains Javascript en CSS files.                                                                                                                                                |
| DB Structure Cache | The *Database Structure Cache* contains system information about database tables structure, needed by various core routines. No actual content will be contained here.                              |
| Thumbnail Cache    | The *Thumbnail Cache*  contains binary image data. This way the webserver is not required to process as much upon every page load (and thus lowers the impact on the performance of the webserver). |

## Cache management

### Enabling and/or disabling caches

You can enable or disable the *Content Cache*, the *System Cache* and the *JS/CSS Cache* by using the switches and clicking the "Set cache status" button.&#x20;

{% hint style="info" %}
The *DB Structure Cache* and *Thumbnail Cache* cannot be disabled as this would impact the performance of the webserver too severely.&#x20;
{% endhint %}

### Clearing caches

You can clear individual caches or all caches at once, by selecting the appropriate option for the dropdown menu and clicking the "Delete" button.&#x20;


---

# 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://userguide.e107.org/administration/settings/cache.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.
