# "not opting out of query cache; authorization is not alowed"

**URL:** https://discuss.elastic.co/t/not-opting-out-of-query-cache-authorization-is-not-alowed/214487
**Category:** Elasticsearch
**Created:** [January 9, 2020, 8:15pm UTC](https://discuss.elastic.co/t/not-opting-out-of-query-cache-authorization-is-not-alowed/214487 "2020-01-09T20:15:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dstromberg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dstromberg/32/52956_2.png) [@dstromberg](https://discuss.elastic.co/u/dstromberg)
#### Post date: [January 9, 2020, 8:15pm UTC](https://discuss.elastic.co/t/not-opting-out-of-query-cache-authorization-is-not-alowed/214487/1 "2020-01-09T20:15:56Z")

</div>

Hello people.

I'm getting a lot of the following in my Elasticsearch 7.3.2 logs:  
[index\_name] not opting out of the query cache; authorization is not allowed  
...for several indexes, and the messages repeat.

I googled about it and found remarkably little.

What does this message mean? I found it in OptOutQueryCache.java, and it seems to have something to do with licensing?

I don't think I want elasticsearch caching, especially if it caches negative results. We have a lot of code that'll issue an elasticsearch request, and then retry with exponential backoff upon not receiving any useful result - it's really slowing down our test suite.

How can I disable elasticsearch caching? I'm interested in:

1. ...how to disable caching for all of elasticsearch
2. ...how to disable caching for just one index
3. ...how to disable caching for just one query - is it like res = s.execute(ignore\_cache=True) with the DSL?

...so we can compare which works best for us.

Filesystem caching is not a problem for us, and in fact is a good thing as a performance optimization that doesn't change results.

We're working mostly in Python. We're mostly using elasticsearch\_dsl, but we also use some of elasticsearch-py.

Thanks!

---

<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: [February 6, 2020, 8:16pm UTC](https://discuss.elastic.co/t/not-opting-out-of-query-cache-authorization-is-not-alowed/214487/2 "2020-02-06T20:16:07Z")

</div>

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