# Chce types

**URL:** <https://discuss.elastic.co/t/chce-types/10052>\
**Category:** Elasticsearch\
**Created:** [December 12, 2012, 10:01am UTC](https://discuss.elastic.co/t/chce-types/10052 "2012-12-12T10:01:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [December 12, 2012, 10:01am UTC](https://discuss.elastic.co/t/chce-types/10052/1 "2012-12-12T10:01:18Z")

</div>

Hi,

I am not sure and can find it nowhere. Is there any description of cache  
types ? I mean what do 'resident', 'soft', 'weak' mean and how do they work?

Best regards.  
Marcin Dojwa

--

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [December 12, 2012, 10:09am UTC](https://discuss.elastic.co/t/chce-types/10052/2 "2012-12-12T10:09:35Z")

</div>

Hi Marcin,

Here's a really good article about ES caching:

On Wed, Dec 12, 2012 at 12:01 PM, Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)wrote:

> Hi,
> 
> I am not sure and can find it nowhere. Is there any description of cache  
> types ? I mean what do 'resident', 'soft', 'weak' mean and how do they work?
> 
> Best regards.  
> Marcin Dojwa
> 
> --

--  
[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [December 12, 2012, 10:10am UTC](https://discuss.elastic.co/t/chce-types/10052/3 "2012-12-12T10:10:44Z")

</div>

Hmmm, didn't you miss the link ? 🙂

2012/12/12 Radu Gheorghe [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)

> Hi Marcin,
> 
> Here's a really good article about ES caching:
> 
> On Wed, Dec 12, 2012 at 12:01 PM, Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)wrote:
> 
> > Hi,
> > 
> > I am not sure and can find it nowhere. Is there any description of cache  
> > types ? I mean what do 'resident', 'soft', 'weak' mean and how do they work?
> > 
> > Best regards.  
> > Marcin Dojwa
> > 
> > --
> 
> --  
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> --

--

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [December 12, 2012, 10:11am UTC](https://discuss.elastic.co/t/chce-types/10052/4 "2012-12-12T10:11:51Z")

</div>

Sorry, I accidentally hit send ☹

So, the article:

> **[Sematext ElasticSearch Services](https://sematext.com/elasticsearch)**
>
> Optimize your Elasticsearch performance with Sematext. Get real-time monitoring, logging, and troubleshooting to ensure peak efficiency.

It tells quite a lot of how caching works in ES. For example, about soft  
caches:  
"Elasticsearch uses Google Guava libraries to implement its cache. The \*soft

- type wraps cache values in soft references, which means that whenever  
memory is needed garbage collector will clear those references even when  
they are used. This means that when you start hitting heap memory limit,  
the JVM wont throw OutOfMemory exception, but will instead release those  
soft references with the use of garbage collector. More about soft  
references can be found at:

## [SoftReference (Java Platform SE 6)](http://docs.oracle.com/javase/6/docs/api/java/lang/ref/SoftReference.html)" Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Wed, Dec 12, 2012 at 12:09 PM, Radu Gheorghe  
[radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)wrote:

> Hi Marcin,
> 
> Here's a really good article about ES caching:
> 
> On Wed, Dec 12, 2012 at 12:01 PM, Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)wrote:
> 
> > Hi,
> > 
> > I am not sure and can find it nowhere. Is there any description of cache  
> > types ? I mean what do 'resident', 'soft', 'weak' mean and how do they work?
> > 
> > Best regards.  
> > Marcin Dojwa
> > 
> > --
> 
> --  
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [December 12, 2012, 10:34am UTC](https://discuss.elastic.co/t/chce-types/10052/5 "2012-12-12T10:34:09Z")

</div>

Thank you. That is what I was looking for 🙂

2012/12/12 Radu Gheorghe [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)

> Sorry, I accidentally hit send ☹
> 
> So, the article:  
> [ElasticSearch Cache Usage - Sematext](http://blog.sematext.com/2012/05/17/elasticsearch-cache-usage/)
> 
> It tells quite a lot of how caching works in ES. For example, about soft  
> caches:  
> "Elasticsearch uses Google Guava libraries to implement its cache. The \*  
> soft\* type wraps cache values in soft references, which means that  
> whenever memory is needed garbage collector will clear those references  
> even when they are used. This means that when you start hitting heap memory  
> limit, the JVM wont throw OutOfMemory exception, but will instead release  
> those soft references with the use of garbage collector. More about soft  
> references can be found at:
> 
> ## [SoftReference (Java Platform SE 6)](http://docs.oracle.com/javase/6/docs/api/java/lang/ref/SoftReference.html)" Best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> On Wed, Dec 12, 2012 at 12:09 PM, Radu Gheorghe \<  
> [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)\> wrote:
> 
> > Hi Marcin,
> > 
> > Here's a really good article about ES caching:
> > 
> > On Wed, Dec 12, 2012 at 12:01 PM, Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)wrote:
> > 
> > > Hi,
> > > 
> > > I am not sure and can find it nowhere. Is there any description of cache  
> > > types ? I mean what do 'resident', 'soft', 'weak' mean and how do they work?
> > > 
> > > Best regards.  
> > > Marcin Dojwa
> > > 
> > > --
> > 
> > --  
> > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> --

--

---

<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, 3:00am UTC](https://discuss.elastic.co/t/chce-types/10052/6 "2017-07-06T03:00:08Z")

</div>

Closed on July 6, 2017, 3:00am UTC


