# Elasticsearch query performance testing, ignore cache flag/option?

**URL:** https://discuss.elastic.co/t/elasticsearch-query-performance-testing-ignore-cache-flag-option/358155
**Category:** Elasticsearch
**Created:** [April 24, 2024, 6:15pm UTC](https://discuss.elastic.co/t/elasticsearch-query-performance-testing-ignore-cache-flag-option/358155 "2024-04-24T18:15:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ppafford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppafford/32/36533_2.png) [@ppafford](https://discuss.elastic.co/u/ppafford)
#### Post date: [April 24, 2024, 6:15pm UTC](https://discuss.elastic.co/t/elasticsearch-query-performance-testing-ignore-cache-flag-option/358155/1 "2024-04-24T18:15:43Z")

</div>

I can't find anything in the docs but does Elasticsearch Query API (I Think) have an option to not cache the query results so I can test the query performance?

example query:

```auto
GET my_index-*/_count
{
  "query": {
    "range": {
      "the_date_range": {
        "gte": "2024-04-01||/M",
        "lte": "2024-04-15||/M"
      }
    }
  }
}

```

my idea for cache-query-results:

```auto
GET my_index-*/_count
{
  "query": {
    "range": {
      "the_date_range": {
        "gte": "2024-04-01||/M",
        "lte": "2024-04-15||/M"
      }
    }
  },
  "cache-query-results": false
}

```

basically if I pass the option in the query to not cache the results, Elasticsearch would not query the results and I could get a true performance test, instead of the next sequencial request returning the cached results.

Open to suggestions, ideas, how to make a feture request, etc...
