MCPcopy Create free account
hub / github.com/diyhi/bbs / getCache

Method getCache

src/main/java/cms/cache/CacheApiManager.java:28–33  ·  view source on GitHub ↗

获取缓存 @param cacheName 缓存名称 @param key 缓存Key

(String cacheName,final String key)

Source from the content-addressed store, hash-verified

26 * @param key 缓存Key
27 */
28 public Object getCache(String cacheName,final String key){
29 //第一个参数: 缓存名称 第二个参数: key的类型 第三个参数: value的类型
30 javax.cache.Cache<Object, Object> preConfigured = jCacheManager.getCache(cacheName, Object.class, Object.class);
31
32 return preConfigured.get(key);
33 }
34
35 /**
36 * 添加缓存

Callers 5

jCacheManagerMethod · 0.80
addCacheMethod · 0.80
deleteCacheMethod · 0.80
clearCacheMethod · 0.80
queryTopicCacheMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected