zoukankan
html css js c++ java
Asp.net(C#)显示所有缓存 清除所有缓存
//
清除所有缓存
protected
void
RemoveAllCache()
{
System.Web.Caching.Cache _cache
=
HttpRuntime.Cache;
IDictionaryEnumerator CacheEnum
=
_cache.GetEnumerator();
ArrayList al
=
new
ArrayList();
while
(CacheEnum.MoveNext())
{
al.Add(CacheEnum.Key);
}
foreach
(
string
key
in
al)
{
_cache.Remove(key);
}
show();
}
//
显示所有缓存
void
show()
{
string
str
=
""
;
IDictionaryEnumerator CacheEnum
=
HttpRuntime.Cache.GetEnumerator();
while
(CacheEnum.MoveNext())
{
str
+=
"
缓存名<b>[
"
+
CacheEnum.Key
+
"
]</b><br />
"
;
}
this
.Label1.Text
=
"
当前网站总缓存数:
"
+
HttpRuntime.Cache.Count
+
"
<br />
"
+
str;
}
查看全文
相关阅读:
远程桌面 终端服务器超出最大连接数的解决方法
html a标签中调用js中的方法的方法
英文励志歌曲经典珍藏
远程桌面 习惯性注销连接,出事了
小幽默
MySQL用户权限
MyBatis Like 模糊查询
MVC3控制器方法获取Form数据方法
MVC 3 Razor中的@helper 语法
MVC3实现多个按钮提交
原文地址:https://www.cnblogs.com/wangyong969/p/1356928.html
最新文章
NSOperationQueue 的整理
Objectc 内存一些事
UILable自适应大小
ios retina
Hibernate查询问题
【转】AOP概念
ExtJS4笔记1
iReport自适应行高
【转】Hibernate日志类别
【转】23种常用设计模式
热门文章
xtype对应表
识别国际长途来电
【转】ORACLE EBS 功能模块
Hibernate注解之@Enumerated
python3csv写入中文乱码
ps快速去除二维码
win下python虚拟环境virtualenv的进阶virtualenvwrapper使用,设置国内源,导出依赖,安装依赖
两个选择
MySQL 5.6 体验一下
做人的七张王牌
Copyright © 2011-2022 走看看