Set the QueryStringCache cache size

Current version: 9.1

Applies to

Content Delivery, Content Management

Sitecore uses the QueryStringCache cache when it parses query strings. In most sitations, the default size of this cache (100KB) is large enough, but if you see in your log files that this cache is cleared a lot, you can set a different size for the cache. Frequent clearing of the cache can be caused by having very long query strings, or having a lot of query strings.

To set the size of this cache:

  • Create a patch file and set the size you need for the cache:

    RequestResponse
    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
        <sitecore>
            <settings>
                  <setting name="Caching.TinyCacheSize" set:value="1000KB"/>
            </settings>
        </sitecore>
    </configuration>
Note

The size is set with the TinyCacheSize setting. Other Sitecore caches use the same setting.

Do you have some feedback for us?

If you have suggestions for improving this article,