Last active
August 29, 2015 14:15
-
-
Save abhirockzz/14927cb22dad2fa16402 to your computer and use it in GitHub Desktop.
Choosing JCache providers
This file contains 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
//set JMV level system property | |
-Djavax.cache.spi.cachingprovider=org.ehcache.jcache.JCacheCachingProvider | |
//code level config | |
System.setProperty("javax.cache.spi.cachingprovider","org.ehcache.jcache.JCacheCachingProvider"); | |
//you want to choose from multiple JCache providers at runtime | |
CachingProvider ehcacheJCacheProvider = Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider"); | |
//which JCache providers do I have on the classpath? | |
Iterable<CachingProvider> jcacheProviders = Caching.getCachingProviders(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment