# Elasticsearch as caching store

**URL:** <https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489>\
**Category:** Elasticsearch\
**Created:** [November 20, 2013, 9:50am UTC](https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489 "2013-11-20T09:50:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)\
**Post date:** [November 20, 2013, 9:50am UTC](https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489/1 "2013-11-20T09:50:25Z")

</div>

Hi All,

We want to use the Elasticsearch as caching store. We are planning to use  
MMap store for that purpose.

Any suggestion would really be appreciable !!

Regards,  
Ankit

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 20, 2013, 10:55am UTC](https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489/2 "2013-11-20T10:55:23Z")

</div>

It depends on what you want to cache. In most cases with ES, cache is  
overkill because ES uses internal caching, and it easily ends up in the  
double caching problem which affects performance.

Saving ES query results? Depends on your queries, their runtime,  
concurrency, length of result set, network latency...

Saving Java objects on the heap? Look at Guava

> **[google/guava](https://github.com/google/guava)**
>
> guava - Google core libraries for Java

Or a generic, volatile key/value memory cache? Look at memcached  
[http://memcached.org/](http://memcached.org/)

Jörg

--  
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:** ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)\
**Post date:** [November 20, 2013, 11:03am UTC](https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489/3 "2013-11-20T11:03:40Z")

</div>

Hi Jorg,

Thank you very much for your response.

We are planning to store the 2 Elasticsearch cluster.

Cluster 1 will store the data using neoFs file-system.  
Cluster 2 will store the data using mMap file-system and will store the  
result of queries fired on cluster1. Later, we would search on cluster 2 to  
apply some more filtering/condition on fetched records.

Regards,  
Ankit Jain

On Wednesday, 20 November 2013 16:25:23 UTC+5:30, Jörg Prante wrote:

> It depends on what you want to cache. In most cases with ES, cache is  
> overkill because ES uses internal caching, and it easily ends up in the  
> double caching problem which affects performance.
> 
> Saving ES query results? Depends on your queries, their runtime,  
> concurrency, length of result set, network latency...
> 
> Saving Java objects on the heap? Look at Guava  
> [GitHub - google/guava: Google core libraries for Java](https://code.google.com/p/guava-libraries/wiki/CachesExplained)
> 
> Or a generic, volatile key/value memory cache? Look at memcached  
> [http://memcached.org/](http://memcached.org/)
> 
> Jörg

--  
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:05am UTC](https://discuss.elastic.co/t/elasticsearch-as-caching-store/14489/4 "2017-07-06T02:05:59Z")

</div>


