小编Joh*_*han的帖子

使缓存对象在午夜过期

我有以下代码:

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() 方法已重载,我可以在其中设置依赖项、滑动和绝对过期。我想让缓存在午夜过期。我怎么做?预先感谢!

asp.net caching

1
推荐指数
1
解决办法
3235
查看次数

标签 统计

asp.net ×1

caching ×1