Skip to content

Instantly share code, notes, and snippets.

@noelyahan
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noelyahan/5ba7881cdbebc106b27d to your computer and use it in GitHub Desktop.
Save noelyahan/5ba7881cdbebc106b27d to your computer and use it in GitHub Desktop.
Simple cache creation in v0.5 jcache
CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager("sampleCacheManager");
Cache<String, Integer> cache = cacheManager.getCache("sampleCache");
String key = "1";
int value1 = 9876;
cache.put(key, value1);
int value = cache.get(key).intValue();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment