---
title: "Disable the cache size limit"
slug: "disable-the-cache-size-limit"
abstract: "How to disable the cache size limits for the Sitecore Content Delivery and Content Management server roles."
---
# Disable the cache size limit

| Applies to | Content Delivery, Content Management |
| --- | --- |

> [!warning]
> Monitor memory usage closely if you choose to disable cache size limits. If cache memory usage exceeds available memory, the application will crash and throw an `OutOfMemoryException` exception.

To disable all cache size limits and allow Sitecore to take advantage of any available memory:

- Create a patch file and set the `Caching.DisableCacheSizeLimits` to `true` as in the following example:

    ```xml
    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
    xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
        <sitecore>
           <settings>
                <setting name="Caching.DisableCacheSizeLimits" set:value="true"/>
            </settings>
        </sitecore>
    </configuration>
    ```