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);
}
查看全文
相关阅读:
技术检验
Linux 系统命令总结
ftp服务器的搭建
Win10优秀软件推荐
Mac软件推荐
博客主题美化
无人机开发之四:Pixhawk开发环境搭建
无人机开发之三:飞行器入门理论知识
无人机开发之二:Pixhawk硬件架构
无人机开发之一:Pixhawk与Arduino简述
原文地址:https://www.cnblogs.com/huang/p/1084826.html
最新文章
海量数据处理算法——总结
hashtable 和 散列函数
海量数据处理算法—Bit-Map
随笔
Two Sum
Repeated DNA Sequences 【9ms未解决】
Add Two Numbers 【待优化】
Rotate List 【要优化】
学术搜索
Remove Duplicates from Sorted List II
热门文章
PackagesNotFoundError: The following packages are not available from current channels
python 将数组中取某一值的元素全部替换为其他元素的方法
python 对axis的理解
Kaggle: House Prices: Advanced Regression Techniques
Profiling Top Kagglers: Bestfitting, Currently #1 in the World
pandas之loc iloc ix
python数据拼接: pd.concat
报错:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Sequence Models Week 3 Trigger word detection
Python 学习资料
Copyright © 2011-2022 走看看