我有以下代码:
var tempList = new BrandCollection();
if (HttpContext.Current.Cache["cachedDeviceList"] == null)
{
tempList = Provider.GetDeviceData(info);
HttpContext.Current.Cache.Insert(...);
}
else
{
tempList =
}
Run Code Online (Sandbox Code Playgroud)
Cache.Insert() 方法已重载,我可以在其中设置依赖项、滑动和绝对过期。我想让缓存在午夜过期。我怎么做?预先感谢!