# Does in refresh interval data of the entire shards get changed

**URL:** https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886
**Category:** Elasticsearch
**Created:** [July 28, 2020, 10:33am UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886 "2020-07-28T10:33:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rishabh\_jain](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)
#### Post date: [July 28, 2020, 10:33am UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/1 "2020-07-28T10:33:25Z")

</div>

Does in refresh interval data of the entire shards get changed or only the data which has been changed.  
Suppose  
refresh interval is **1s**.  
And in if **index.requests.cache.enable = true** then filter query results will be cached .  
So will refresh interval will flush all the data from cache or only the data which has been changed

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 28, 2020, 10:35am UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/2 "2020-07-28T10:35:45Z")

</div>

The refresh interval does not relate to the request cache.

From [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/indices-refresh.html);

> A refresh makes all operations performed on an index since the last refresh available for search.

An operation means an index (write), delete or update.

---

<div class="post-metadata">

### Author: ![rishabh\_jain](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)
#### Post date: [July 28, 2020, 11:04am UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/3 "2020-07-28T11:04:58Z")

</div>

Please have a look at this. In Cache Invalidation it is mentioned the caches clear's as soon as the shard gets refreshed  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 28, 2020, 10:00pm UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/4 "2020-07-28T22:00:13Z")

</div>

You're right sorry, I forgot that also happened.

So every time a refresh happens, it invalidates that cache.

---

<div class="post-metadata">

### Author: ![rishabh\_jain](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)
#### Post date: [July 29, 2020, 5:56am UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/5 "2020-07-29T05:56:27Z")

</div>

So it invalidate's the entire cache or it invalidate's only the documents which are updated

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 29, 2020, 9:39pm UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/6 "2020-07-29T21:39:46Z")

</div>

The entire cache.

---

<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: [August 26, 2020, 9:39pm UTC](https://discuss.elastic.co/t/does-in-refresh-interval-data-of-the-entire-shards-get-changed/242886/7 "2020-08-26T21:39:48Z")

</div>

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