在FastChar默认支持使用Redis缓存框架,如下代码:
public class FastCharWeb implements IFastWeb {
/**
* web启动初始化
* @param engine
*/
@Override
public void onInit(FastEngine engine) throws Exception {
/**此处省略其他代码**/
engine.getConfigs()
.getRedisConfig()
.addServer("localhost", 6379);//添加redis服务器
}
}