# Cache invalidating and recreation on TermsFilter values change

**URL:** <https://discuss.elastic.co/t/cache-invalidating-and-recreation-on-termsfilter-values-change/19485>\
**Category:** Elasticsearch\
**Created:** [August 27, 2014, 8:26am UTC](https://discuss.elastic.co/t/cache-invalidating-and-recreation-on-termsfilter-values-change/19485 "2014-08-27T08:26:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [August 27, 2014, 8:26am UTC](https://discuss.elastic.co/t/cache-invalidating-and-recreation-on-termsfilter-values-change/19485/1 "2014-08-27T08:26:06Z")

</div>

Hi,

I am using the IndexQueryParserModule and in the plugin, I have my  
TermsFilter implementation.

By default, since I am writing my own ABCFilterBuilder/Parser, I believe, I  
can control the caching, and ES will, by default, not cache the Lucene  
TermsFilter that I return. Correct me if I am wrong.

Can I specify a cache\_key and have this explicitly cached by ES? It seems,  
from other FilterParsers, that this may be possible.

Although, when the documents in the filter condition change, I want the  
cache to be invalidated and a new filter created again, and then cached  
again.

Is that possible? Please let me know.

Thanks,  
Sandeep

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/09fe53d1-f573-4e1a-9e50-a40fd129256c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/09fe53d1-f573-4e1a-9e50-a40fd129256c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:06am UTC](https://discuss.elastic.co/t/cache-invalidating-and-recreation-on-termsfilter-values-change/19485/2 "2017-07-06T01:06:05Z")

</div>

Closed on July 6, 2017, 1:06am UTC


