📄 cachefactory.java
字号:
package cn.hxex.exam.cache;
import cn.hxex.exam.config.CacheConfig;
import cn.hxex.exam.config.ExamConfigUtil;
import cn.hxex.exam.util.HxexClassUtils;
/**
* The Cache Factory
*
* @author galaxy
*
*/
public class CacheFactory
{
/**
* Get the Cache instance
*
* @return the cache instance
*/
public static Cache getCache()
{
// 得到缓存对象的配置信息
CacheConfig cacheconfig = ExamConfigUtil.getCacheConfig();
// 得到缓存对象的实例
Cache cache = HxexClassUtils.getInstance(Cache.class, cacheconfig
.getType());
// 缓存对象初始化
cache.initialize(cacheconfig.getProperties());
return cache;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -