# Filter Cache Expire

**URL:** <https://discuss.elastic.co/t/filter-cache-expire/13852>\
**Category:** Elasticsearch\
**Created:** [October 4, 2013, 11:47pm UTC](https://discuss.elastic.co/t/filter-cache-expire/13852 "2013-10-04T23:47:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Logan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/logan/32/59134_2.png) [@Logan](https://discuss.elastic.co/u/Logan)\
**Post date:** [October 4, 2013, 11:47pm UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/1 "2013-10-04T23:47:45Z")

</div>

I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache gets  
dropped after about 30 minutes or so without seeing any actual evictions.  
I'd like to be able to warm up the cache and have that warm data persist  
until there is an actual need to evict the LRU data. Is there a way to  
control how long my indices.cache.filter is retained? Is it a good idea to  
want to do this in the first place?

-Logan-

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Leonardo\_Menezes](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@Leonardo\_Menezes](https://discuss.elastic.co/u/Leonardo_Menezes)\
**Post date:** [October 5, 2013, 12:21am UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/2 "2013-10-05T00:21:32Z")

</div>

According to the docs, by default the filter cache should not expire:

index.cache.filter.expire: A time based setting that expires filters after  
a certain time of inactivity. Defaults to -1. For example, can be set to 5m for  
a 5 minute expiry.

Where do you see your cache is being dropped? Using the node stats API?

Could it be that your cache is just being invalidated due to updates?

On Sat, Oct 5, 2013 at 1:47 AM, Logan Hardy [loganbhardy@gmail.com](mailto:loganbhardy@gmail.com) wrote:

> I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache  
> gets dropped after about 30 minutes or so without seeing any actual  
> evictions. I'd like to be able to warm up the cache and have that warm data  
> persist until there is an actual need to evict the LRU data. Is there a way  
> to control how long my indices.cache.filter is retained? Is it a good idea  
> to want to do this in the first place?
> 
> -Logan-
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Logan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/logan/32/59134_2.png) [@Logan](https://discuss.elastic.co/u/Logan)\
**Post date:** [October 8, 2013, 9:07pm UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/3 "2013-10-08T21:07:58Z")

</div>

I'm talking about indices.cache.filter not the index.cache.filter.

indices.cache.filter.expire doesn't seem to be documented anywhere that I  
can find but I did try setting it to -1 and the node would not start. I was  
able to set it to 1m and observed corresponding cache evictions as a  
result. The good news is that i've demonstrated that the behavior I was  
talking about in my original post is clearly not caused by the expire  
setting or else I would be seeing evictions with my filter cache drops.  
There is something going on here that I obviously don't understand but it's  
probably just a red herring so I won't stress about it further. Thanks a  
bunch.

On Friday, October 4, 2013 5:47:45 PM UTC-6, Logan Hardy wrote:

> I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache  
> gets dropped after about 30 minutes or so without seeing any actual  
> evictions. I'd like to be able to warm up the cache and have that warm data  
> persist until there is an actual need to evict the LRU data. Is there a way  
> to control how long my indices.cache.filter is retained? Is it a good idea  
> to want to do this in the first place?
> 
> -Logan-

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 8, 2013, 9:53pm UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/4 "2013-10-08T21:53:25Z")

</div>

My filter cache expires for no reason all the time. Been trying to pinpoint  
why for a while now.

Cheers,

Ivan

On Tue, Oct 8, 2013 at 2:07 PM, Logan Hardy [loganbhardy@gmail.com](mailto:loganbhardy@gmail.com) wrote:

> I'm talking about indices.cache.filter not the index.cache.filter.
> 
> indices.cache.filter.expire doesn't seem to be documented anywhere that I  
> can find but I did try setting it to -1 and the node would not start. I was  
> able to set it to 1m and observed corresponding cache evictions as a  
> result. The good news is that i've demonstrated that the behavior I was  
> talking about in my original post is clearly not caused by the expire  
> setting or else I would be seeing evictions with my filter cache drops.  
> There is something going on here that I obviously don't understand but it's  
> probably just a red herring so I won't stress about it further. Thanks a  
> bunch.
> 
> On Friday, October 4, 2013 5:47:45 PM UTC-6, Logan Hardy wrote:
> 
> > I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache  
> > gets dropped after about 30 minutes or so without seeing any actual  
> > evictions. I'd like to be able to warm up the cache and have that warm data  
> > persist until there is an actual need to evict the LRU data. Is there a way  
> > to control how long my indices.cache.filter is retained? Is it a good idea  
> > to want to do this in the first place?
> > 
> > -Logan-
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Logan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/logan/32/59134_2.png) [@Logan](https://discuss.elastic.co/u/Logan)\
**Post date:** [October 11, 2013, 12:24am UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/5 "2013-10-11T00:24:09Z")

</div>

From what I've bee able to deduce through experimentation, it looks like  
any drop in filter cache that is caused by the LRU eviction or an arbitrary  
expiration time will show up as an actual eviction you can see in the  
bigdesk plugin graph or the node stats api. Simply closing an index or  
reducing the number of replicas can cause it to drop without a  
corresponding spike in the eviction graph (makes sense). Once again for me,  
I'd say I think I was just chasing a red herring here. If someone has  
another explanation I'd like to hear it but this is not a real issue for  
me, just more of a curiosity really. 🙂

-Logan-

On Tuesday, October 8, 2013 3:53:25 PM UTC-6, Ivan Brusic wrote:

> My filter cache expires for no reason all the time. Been trying to  
> pinpoint why for a while now.
> 
> Cheers,
> 
> Ivan
> 
> On Tue, Oct 8, 2013 at 2:07 PM, Logan Hardy \<[logan...@gmail.com](mailto:logan...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > I'm talking about indices.cache.filter not the index.cache.filter.
> > 
> > indices.cache.filter.expire doesn't seem to be documented anywhere that I  
> > can find but I did try setting it to -1 and the node would not start. I was  
> > able to set it to 1m and observed corresponding cache evictions as a  
> > result. The good news is that i've demonstrated that the behavior I was  
> > talking about in my original post is clearly not caused by the expire  
> > setting or else I would be seeing evictions with my filter cache drops.  
> > There is something going on here that I obviously don't understand but it's  
> > probably just a red herring so I won't stress about it further. Thanks a  
> > bunch.
> > 
> > On Friday, October 4, 2013 5:47:45 PM UTC-6, Logan Hardy wrote:
> > 
> > > I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache  
> > > gets dropped after about 30 minutes or so without seeing any actual  
> > > evictions. I'd like to be able to warm up the cache and have that warm data  
> > > persist until there is an actual need to evict the LRU data. Is there a way  
> > > to control how long my indices.cache.filter is retained? Is it a good idea  
> > > to want to do this in the first place?
> > > 
> > > -Logan-
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Logan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/logan/32/59134_2.png) [@Logan](https://discuss.elastic.co/u/Logan)\
**Post date:** [October 11, 2013, 12:26am UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/6 "2013-10-11T00:26:18Z")

</div>

BTW Ivan, I was able to make my filter cache expire by adding  
"indices.cache.filter.expire: 5m" to my elasticsearch.yml. It looks like  
this is not set at all by default but you might want to check to see if  
that is set in your config somewhere.

-Logan-

On Tuesday, October 8, 2013 3:53:25 PM UTC-6, Ivan Brusic wrote:

> My filter cache expires for no reason all the time. Been trying to  
> pinpoint why for a while now.
> 
> Cheers,
> 
> Ivan
> 
> On Tue, Oct 8, 2013 at 2:07 PM, Logan Hardy \<[logan...@gmail.com](mailto:logan...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > I'm talking about indices.cache.filter not the index.cache.filter.
> > 
> > indices.cache.filter.expire doesn't seem to be documented anywhere that I  
> > can find but I did try setting it to -1 and the node would not start. I was  
> > able to set it to 1m and observed corresponding cache evictions as a  
> > result. The good news is that i've demonstrated that the behavior I was  
> > talking about in my original post is clearly not caused by the expire  
> > setting or else I would be seeing evictions with my filter cache drops.  
> > There is something going on here that I obviously don't understand but it's  
> > probably just a red herring so I won't stress about it further. Thanks a  
> > bunch.
> > 
> > On Friday, October 4, 2013 5:47:45 PM UTC-6, Logan Hardy wrote:
> > 
> > > I'm running Elasticsearch 0.90.3 and I've noticed that my filter cache  
> > > gets dropped after about 30 minutes or so without seeing any actual  
> > > evictions. I'd like to be able to warm up the cache and have that warm data  
> > > persist until there is an actual need to evict the LRU data. Is there a way  
> > > to control how long my indices.cache.filter is retained? Is it a good idea  
> > > to want to do this in the first place?
> > > 
> > > -Logan-
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:12am UTC](https://discuss.elastic.co/t/filter-cache-expire/13852/7 "2017-07-06T02:12:56Z")

</div>


