> For the complete documentation index, see [llms.txt](https://cachebox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cachebox.ortusbooks.com/master-1/configuration/cachebox-configuration/cachebox-dsl/caches.md).

# Caches

The caches element is in itself a structure of configuration data for aggregating named cache providers of ANY type. The key is the unique name of the cache to aggregate under this CacheBox instance. The value should be a structure with the following keys:

| Key            | Type   | Required | Default | Description                                                                             |
| -------------- | ------ | -------- | ------- | --------------------------------------------------------------------------------------- |
| **provider**   | string | true     | ---     | The instantiation path of the cache that must implement our `ICacheProvider` interface. |
| **properties** | struct | false    | `{}`    | A structure of name-value pairs of configuration data for the cache to declare.         |

**Example**:

```javascript
// Register all the custom named caches you like here
caches = {
    sampleCache1 = {
        provider="cachebox.system.cache.providers.CacheBoxProvider",
        properties = {
            objectDefaultTimeout="20",
            useLastAccessTimeouts="false",
            reapFrequency="1",
            evictionPolicy="LFU",
            evictCount="1",
            maxObjects="100",
            objectStore="ConcurrentSoftReferenceStore"
        }
    },
    sampleCache2 = {
        provider = "cachebox.system.cache.providers.CFColdboxProvider"
    }
},
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://cachebox.ortusbooks.com/master-1/configuration/cachebox-configuration/cachebox-dsl/caches.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.
