【IT168技术文档】
缓存 CacherFactory:
一句完成, 按时间,key,时间步长缓存任意数据,也可以用key方式操作
预执行方法,例如提早取数据库数据并存起来
缓存中央监控机制
容器:
线程
安全的字典: SafeDictionary<TKey, TValue>
不带硬存取的缓存容器:CacheFactoryBase<Tkey, TValue>
等
其它:
扩展BLL类型TSQL语法的方法:Like(RegxStr),Between(X,Y),In(A,B,C,..)
例子:
return Query["Tbl_Log_GetByKey(ShopID,LogDate)"].Parms(shopID, logDate).GetList<LogInf>();
return Query["Tbl_Log_InsertOrUpdate"].Instance(entity).Execute();
/// <summary>
/// 获取本表所有数据,带缓存,分页
/// </summary>
<returns>返回List数据模型,如果没数据List数量为0</returns>
public List<LogInf> GetAll(DBPagination pagi)
{
return Cacher.Cache(new CacheBox(true, 12/*秒*/, null, null/*key*/),
() =>{
return Query.Pagination(pagi).Select("*").From("Tbl_Log")
.OrderBy("LogDate", DBOrderState.Asc).GetList<LogInf>();
});
}