zoukankan
html css js c++ java
ASP.NET Cache使用
抄的CS里的一段代码。
protected
override
void
OnInit(EventArgs e)
{
List
<
IndexPost
>
recentPosts
=
CSCache.Get(
"
HomePageSearch-
"
+
CurrentCSContext.User.RoleKey)
as
List
<
IndexPost
>
;
if
(recentPosts
==
null
)
{
SearchQuery query
=
new
SearchQuery();
query.StartDate
=
DateTime.Now.AddDays(
-
10
);
query.EndDate
=
DateTime.Now.AddDays(
1
);
query.PageSize
=
5
;
recentPosts
=
CSSearch.Search(query).Posts;
CSCache.Insert(
"
HomePageSearch-
"
+
CurrentCSContext.User.RoleKey, recentPosts, CSCache.MinuteFactor
*
5
);
}
RecentPostList.DataSource
=
recentPosts;
base
.OnInit(e);
}
查看全文
相关阅读:
appium 方法整理
appium_获取元素状态
Locust性能测试_参数关联
Locust性能测试-参数化批量注册
pytest_命令行传参
pytest_函数传参和firture传参数request
pytest_用例a失败,跳过测试用例b和c并标记失败xfail
pytest_skip跳过用例
pytest_使用自定义标记mark
算法:迷宫问题
原文地址:https://www.cnblogs.com/huang/p/1084826.html
最新文章
记一次CSR上线及总结
Exchange 2013 、Lync 2013、SharePoint 2013 二
Exchange 2013 、Lync 2013、SharePoint 2013
Exchange 2013 申请证书
SharePoint 2013 新功能探索 之 标注控件
SharePoint 2013 新功能探索 之 SPGroup、SPUser 事件处理程序 还要继续改进
SharePoint 2013 新功能探索 之 列表等级设置
VS 2013 Preview 自定义 SharePoint 2013 列表 之 两个Bug
SharePoint 2013 Workflow 分布式配置问题记录
第28章:最大连续乘积子串
热门文章
第07章:最大子串和
正则表达式
ActionContext实现原理
FilterDispatcher处理流程
Struts2架构流程
两路归并排序
无向图是否有环
堆排序
归并排序
Python装饰器的通俗理解
Copyright © 2011-2022 走看看