Moving from ehcache API to jCache API

380 views
Skip to first unread message

Christian Schneider

unread,
Jul 8, 2021, 8:21:42 AM7/8/21
to ehcache-users

I would like to configure a ehache3 with a certain heap cache size and disk cache size.
I know how to do this in ehcache API. Where do I find how to do the same in JCache API.
Btw. Background of this is that I want micrometer metrics and as it seems I can only attach micrometer to JCache but not ehcache3.

Best regards
Christian

For illustration what I try to configure this is the setup in ehcache3 syntax.
----
ResourcePools resourcePool = heap(1000).disk(10, MemoryUnit.GB, false).build();
cacheConfig = newCacheConfigurationBuilder(Long.class, String.class, resourcePool).build();

cacheManager = CacheManagerBuilder.newCacheManagerBuilder()             .with(CacheManagerBuilder.persistence(cachePath)).build();
cacheManager.init();

cache = cacheManager.createCache("cache1", cacheConfig);


Chris Dennis

unread,
Aug 2, 2021, 11:53:56 AM8/2/21
to ehcach...@googlegroups.com

I believe the existing Ehcache documentation in this area covers all the possible combinations: https://www.ehcache.org/documentation/3.8/107.html

 

Let me know if what you want to achieve isn’t covered.

 

Chris

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/1ef7d881-b0b4-4295-a1a8-278cd8c4717dn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages