Authored by 胡古飞

fix EhCache

... ... @@ -17,22 +17,21 @@ public class EhCache implements CacheInterface {
private static final Logger logger = LoggerFactory.getLogger(EhCache.class);
private CacheManager cacheManager;
private Cache cache;
private static final CacheManager cacheManager = CacheManager.create();
private static final String cacheName = "talent";
private Cache cache;
private EhCache() {
}
@PostConstruct
private void init() {
this.cacheManager = CacheManager.create();
this.cacheManager.addCache(cacheName);
cacheManager.addCache(cacheName);
this.cache = cacheManager.getCache(cacheName);
}
@Override
public void addOrUpdate(String key, CacheObject value, int expiredTimeInMinute) {
try {
... ...