public class EhcacheCacheProvider extends Object implements CacheProvider
| 构造器和说明 |
|---|
EhcacheCacheProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
清除所有的cache
|
Serializable |
get(String key)
获取放在cache中的内容
|
String |
getCacheName() |
org.springframework.core.io.Resource |
getConfigLocation() |
void |
postCacheManager() |
void |
put(String key,
Serializable cacheObject)
放入cache中
|
void |
remove(String key)
清除cache中对应的值
|
void |
setCacheName(String cacheName) |
void |
setConfigLocation(org.springframework.core.io.Resource configLocation) |
public void put(String key, Serializable cacheObject)
CacheProviderput 在接口中 CacheProviderpublic Serializable get(String key)
CacheProviderget 在接口中 CacheProviderpublic void remove(String key)
CacheProviderremove 在接口中 CacheProviderpublic void clear()
CacheProviderclear 在接口中 CacheProviderpublic String getCacheName()
public void setCacheName(String cacheName)
public org.springframework.core.io.Resource getConfigLocation()
public void setConfigLocation(org.springframework.core.io.Resource configLocation)
@PostConstruct public void postCacheManager() throws IOException, net.sf.ehcache.CacheException
IOExceptionnet.sf.ehcache.CacheExceptionCopyright © 2018. All rights reserved.