Created
August 15, 2015 04:23
-
-
Save noelyahan/a18c723a1f8b0a7b34a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager("test"); | |
String cacheName = "cacheXXX"; | |
cache = cacheManager.<String,Integer>createCacheBuilder(cacheName).setExpiry(CacheConfiguration.ExpiryType.MODIFIED, new CacheConfiguration.Duration(TimeUnit.SECONDS, 10)). | |
setStoreByValue(false).build(); | |
int value = 9876; | |
cache.put(key, value); | |
assertEquals(cache.get(key).intValue(), value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment