Is there a way to persist data in EhCache 3+ during restarts?

1,531 views
Skip to first unread message

Khaled

unread,
Apr 20, 2018, 11:05:15 AM4/20/18
to ehcache-users
Hi,

I would like to check if EhCache 3+ supports persisting data from cache before application restart?


Any information for EhCache 3? Thank you.
  1. What version of Ehcache you are currently using;   
    3.4.0
  2. Paste the configuration for the Cache/CacheManager you have an issue with;
    Using 
    CacheConfiguration and CacheManagerBuilder via code to construct a Cache instance with on-heap + off-heap storage
  1. Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate);
    None
  2. Providing JDK and OS versions maybe useful as well.
    Java 8

Henri Tremblay

unread,
Apr 20, 2018, 3:24:33 PM4/20/18
to ehcach...@googlegroups.com
Yes. It does.


However, the server must do a clean shutdown. Fast restart in case of failure is currently an enterprise feature.

Henri

--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-users+unsubscribe@googlegroups.com.
To post to this group, send email to ehcach...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/5ddad5e6-2b1a-4dc5-bdff-2c28a028f68f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Khaled

unread,
Apr 23, 2018, 5:12:36 AM4/23/18
to ehcache-users
Hi Henri,

Thanks a lot for your help.

A small follow up question: does this only persist disk level resource pool tier ? 

I am currently using on-heap and off-heap tiers. Do I need to add disk tier for persistence to work? 

Thanks in advance




On Friday, April 20, 2018 at 8:24:33 PM UTC+1, Henri Tremblay wrote:
Yes. It does.


However, the server must do a clean shutdown. Fast restart in case of failure is currently an enterprise feature.

Henri
On 20 April 2018 at 11:05, Khaled <k...@khaled-bakhit.com> wrote:
Hi,

I would like to check if EhCache 3+ supports persisting data from cache before application restart?


Any information for EhCache 3? Thank you.
  1. What version of Ehcache you are currently using;   
    3.4.0
  2. Paste the configuration for the Cache/CacheManager you have an issue with;
    Using 
    CacheConfiguration and CacheManagerBuilder via code to construct a Cache instance with on-heap + off-heap storage
  1. Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate);
    None
  2. Providing JDK and OS versions maybe useful as well.
    Java 8

--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-user...@googlegroups.com.

Anthony Dahanne

unread,
Apr 23, 2018, 9:24:01 AM4/23/18
to ehcache-users
Hello,
No, it will persist all the entries; ehcache 3 being a multi tiered caching library and the different tiers being part of a hierarchy, if you set up on heap + offheap + disk, disk will be the authoritative tier and as such will contain all your entries,
Anthony

Chris Dennis

unread,
Apr 23, 2018, 9:24:53 AM4/23/18
to ehcach...@googlegroups.com
Just to confirm though… you will need to add a disk tier.

Reply all
Reply to author
Forward
0 new messages