Configuration
CachingProvider provider = Caching.getCachingProvider();
CacheManager cacheManager = provider.getCacheManager();
CacheConfiguration<Integer, String> configuration = CacheConfiguration
.Builder(Integer.class, String.class)
.storeByValue()
.expiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Duration.ONE_MINUTE))
.build();
Cache<Integer, String> cache = cacheManager.createCache("jCache", configuration);
cache.put(1, "Hello World");
String value = cache.get(1); CacheConfiguration<Integer, String> configuration = CacheConfiguration
.Load("cache-config.properties", Integer.class, String.class);Last updated