# Query cache gets invalidated

**URL:** https://discuss.elastic.co/t/query-cache-gets-invalidated/216032
**Category:** Elasticsearch
**Created:** [January 22, 2020, 10:29am UTC](https://discuss.elastic.co/t/query-cache-gets-invalidated/216032 "2020-01-22T10:29:54Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![DeeeFOX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deeefox/32/49566_2.png) [@DeeeFOX](https://discuss.elastic.co/u/DeeeFOX)
#### Post date: [January 23, 2020, 5:13am UTC](https://discuss.elastic.co/t/query-cache-gets-invalidated/216032/8 "2020-01-23T05:13:34Z")

</div>

> [@royal\_man](#):
>
> { "query": { "bool": { "should": [{ "term": { "status": "online" } }, { "term": { "status": "available" } }, { "term": { "status": "admin" } }] } } }

@royal_man to ur use case talking above, only [file-system-cache](https://www.elastic.co/guide/en/elasticsearch/reference/current/preload-data-to-file-system-cache.html) can help.

Just change or append the index setting, with enough free mem in ur data nodes (to [our-tsdb-use-case](https://discuss.elastic.co/t/can-es-not-to-store-original-keyword-content-but-a-mapping-num-value-4-save-space/215664): 31G on-heap + 96G off-heap / per node):

> index.store.preload: ["nvd", "dvd", "tim", "doc", "dim"]

or more aggressive

> index.store.preload: ["\*"]

And reopen ur index, u will see difference!  
Wish it can help u!

---

_[View the full topic](https://discuss.elastic.co/t/query-cache-gets-invalidated/216032)._
