111,126
社区成员
发帖
与我相关
我的任务
分享HttpRuntime.Cache.Insert(key, MyConfigObject, new CacheDependency(filePath));System.Web.Runtime.HttRuntime这个类也可以使用在winform中。
private void Form1_Load(object sender, EventArgs e)
{
//runTime = new HttpRuntime();
cache = HttpRuntime.Cache;
cache.Add("something", "something", null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.Default, null);
string something = cache["something"] as string;
}