(点击上方公众号,可快速关注)来源:翡青,blog.csdn.net/zjf280441589/article/details/54406665如有好文章投稿,请点击 → 这里了解详情第2组: off-heap、not affect by GC、need serializeEhcacheApppublic class EhcacheApp extends AbstractAppInvoker { private static Cache cache; static { ResourcePools resourcePools = ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(1000, EntryUnit.ENTRIES) .offheap(480, MemoryUnit.MB) .build(); CacheConfiguration configuration = CacheConfigurationBuilder .newCacheConfigurationBuilder(String.class, FeedDO.class, resourcePools) .build(); cache = CacheManagerBuilder.newCacheManagerBuilder() .withCache("cacher", configuration)
………………………………