ASP.NET 缓存学习

ASP.NET 缓存在项目中的引用,如下:

        private staticobject _lock = newobject();

protected voidPage_Load(object sender, EventArgs e)

{



if (!IsPostBack)

{

//Set outputcache

string Duration = ConfigStore.GetValue("MerckVaccine", "AboutToLeaveCache").ToString();

string URLList = "";

lock (_lock)

{

URLList
= (string)Cache["URLListKey"];

if (String.IsNullOrEmpty(URLList))

{

URLList
= GetLeavSiteListData();

Cache.Insert(
"URLListKey",URLList, null,

System.Web.Caching.Cache.NoAbsoluteExpiration,

TimeSpan.FromSeconds(
double.Parse(Duration)));

}

}

}

  

ASP.NET 缓存详解资源:

http://www.cnblogs.com/ASPNET2008/archive/2008/10/09/1307370.html

http://www.cnblogs.com/carysun/archive/2009/11/08/AspDotNetCache.html

http://www.zggov.com/program/.net/html/20109192155.html

你可能感兴趣的:(asp.net)