You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Mikael <mi...@telia.com> on 2018/01/08 21:24:32 UTC

Limit cache size ?

Hi!

Is there any way I can limit the number of items in a cache ? I know the 
JCache API does not support it, only the time based expiration, but 
using that mean that a cache can grow a lot if it gets fed a lot of 
items in a short time, something like the LRU eviction but that deletes 
older items instead of moving them from heap to non heap.



Re: Limit cache size ?

Posted by vkulichenko <va...@gmail.com>.
Jeff,

By default you will have a single data region limited to 80% of physical
memory, and all caches will be assigned to this region.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Limit cache size ?

Posted by Jeff Jiao <je...@gmail.com>.
Hi Val,

Is there a max entry limit for a single cache by default?
Is it Integer.MAX_VALUE? what will happen if the data amount reaches the
limit or pass it?


Thanks,
Jeff



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Limit cache size ?

Posted by vkulichenko <va...@gmail.com>.
Ignite stores data in off-heap memory, so you can't limit the number of
entries, but you can limit the amount of memory allocated for caches. This
is done via data region configuration:
https://apacheignite.readme.io/docs/memory-configuration

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/