HttpContext.Current.Cache - 什么时候这个被自动清零? [英] HttpContext.Current.Cache - When does this gets cleared automatically?

查看:507
本文介绍了HttpContext.Current.Cache - 什么时候这个被自动清零?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web表单应用程序,我使用HttpContext.Current.Cache存储一些信息,这些不同形式的使用,以避免前往分贝每一次。

In my Web forms application I am using HttpContext.Current.Cache to store some information which different forms use to avoid going to db every time.

我的问题是,什么时候才能被清除?或者,它会一直保留,直到我删除它通过code或重新启动IIS?

My Question is, when will this get cleared? Or it will remain there until I remove it through code or restart IIS ?

推荐答案

缓存保存在内存中,直到该过程停止。

The cache is held in memory until the process is stopped.

所以,重置IIS或回收的应用程序池也将清除缓存。

So, resetting IIS or recycling the application pool would also clear the cache.

这篇关于HttpContext.Current.Cache - 什么时候这个被自动清零?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆