本文介绍了在ASP.NET Cache.Insert的默认持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有以下行,当我应该期待缓存过期?

  System.Web.HttpRuntime.Cache.Insert(someKey,测试值);


解决方案

从不,也就是说,只要内存不足和ASP.NET缓存认为它有更重要的东西,以保持。

If I have the following line, when should I expect the cache to expire?

System.Web.HttpRuntime.Cache.Insert("someKey", "Test value");
解决方案

"Never", that is, as soon as memory is low and ASP.NET Cache thinks it has something more important to keep.

这篇关于在ASP.NET Cache.Insert的默认持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 23:27