[[shard-request-cache-settings]]
=== Shard request cache settings

When a search request is run against an index or against many indices, each
involved shard executes the search locally and returns its local results to
the _coordinating node_, which combines these shard-level results into a
``global'' result set.

The shard-level request cache module caches the local results on each shard.
This allows frequently used (and potentially heavy) search requests to return
results almost instantly. The requests cache is a very good fit for the logging
use case, where only the most recent index is being actively updated --
results from older indices will be served directly from the cache. You can use shard request cache settings to control the size and expiration of the cache.

To learn more about the shard request cache, see <<shard-request-cache>>.

[discrete]
==== Cache settings

`indices.requests.cache.size`::
(<<static-cluster-setting,Static>>) The maximum size of the cache, as a percentage of the heap. Default: `1%`.

`indices.requests.cache.expire`::
(<<static-cluster-setting,Static>>) The TTL for cached results. Stale results are automatically invalidated when the index is refreshed, so you shouldn't need to use this setting.

