# How to disable caching in ES?

**URL:** https://discuss.elastic.co/t/how-to-disable-caching-in-es/344889
**Category:** Elasticsearch
**Tags:** rally
**Created:** [October 12, 2023, 9:06am UTC](https://discuss.elastic.co/t/how-to-disable-caching-in-es/344889 "2023-10-12T09:06:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leslience](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leslience/32/126459_2.png) [@leslience](https://discuss.elastic.co/u/leslience)
#### Post date: [October 12, 2023, 9:06am UTC](https://discuss.elastic.co/t/how-to-disable-caching-in-es/344889/1 "2023-10-12T09:06:58Z")

</div>

I am currently facing a challenge where I want to disable the query cache in ES, so that every query request reads data from disk instead of directly accessing ES's JVM memory cache. Query requests include but are not limited to (term, etc.). Can someone tell me how to achieve this? This has been bothering me for a long time. I am currently testing the geonames dataset in esrally, and I want to know the delay of ES reading data from disk for queries, rather than the delay of possibly hitting the cache.

---

<div class="post-metadata">

### Author: ![gbanasiak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gbanasiak/32/121454_2.png) [@gbanasiak](https://discuss.elastic.co/u/gbanasiak)
#### Post date: [October 12, 2023, 10:33am UTC](https://discuss.elastic.co/t/how-to-disable-caching-in-es/344889/2 "2023-10-12T10:33:27Z")

</div>

Most benchmarks disable request cache through index settings, see example [here](https://github.com/elastic/rally-tracks/blob/b389aee3a478c2745b591a5b8b31917b959999b4/geonames/index.json#L6) for geonames track. The alternative is to use `"cache": false` property of a search-related operations, see [docs](https://esrally.readthedocs.io/en/stable/track.html#id6).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 9, 2023, 10:33am UTC](https://discuss.elastic.co/t/how-to-disable-caching-in-es/344889/3 "2023-11-09T10:33:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
