# How good is to clear the field data cache on a regular basis

**URL:** https://discuss.elastic.co/t/how-good-is-to-clear-the-field-data-cache-on-a-regular-basis/287400
**Category:** Elasticsearch
**Created:** [October 22, 2021, 5:59am UTC](https://discuss.elastic.co/t/how-good-is-to-clear-the-field-data-cache-on-a-regular-basis/287400 "2021-10-22T05:59:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![curiousmind](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/curiousmind/32/69452_2.png) [@curiousmind](https://discuss.elastic.co/u/curiousmind)
#### Post date: [October 22, 2021, 5:59am UTC](https://discuss.elastic.co/t/how-good-is-to-clear-the-field-data-cache-on-a-regular-basis/287400/1 "2021-10-22T05:59:57Z")

</div>

I have big daily indices and sometimes the indexing get stopped or delayed. When i clear the cache, everything goes back to normal. So I was thinking of clearing the cache , especially field cache in every 20-30 minutes by running a cronjob.  
We have some 100 requests per 5 minutes on the cluster, from Elastalert.  
I am on 7.10 cluster.  
Is it a good practice to clear the cache (at least field data cache) that often?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [October 23, 2021, 10:41am UTC](https://discuss.elastic.co/t/how-good-is-to-clear-the-field-data-cache-on-a-regular-basis/287400/2 "2021-10-23T10:41:11Z")

</div>

> [@curiousmind](#):
>
> Is it a good practice to clear the cache (at least field data cache) that often?

No. It sounds like you might be working around a deeper problem by clearing the cache, but you'd do better to investigate and fix the deeper problem instead. Why is indexing slowing down? Why are you using fielddata so heavily? Would it be better to use docvalues instead?

---

<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 20, 2021, 10:41am UTC](https://discuss.elastic.co/t/how-good-is-to-clear-the-field-data-cache-on-a-regular-basis/287400/3 "2021-11-20T10:41:31Z")

</div>

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