阿林`alinBlog

 asp清理站点缓存

阿林, 发表于:2008-06-29 02:09:05, 分类:asp 浏览( ) 评论( )  收藏这篇日志

<%
Call RemoveAllCache()

Sub RemoveAllCache()
Dim cachelist,i
Call InnerHtml("UpdateInfo","<b>开始执行清理当前站点缓存</b>:")
Cachelist=split(GetallCache(),",")
If UBound(cachelist)>1 Then
For i=0 to UBound(cachelist)-1
DelCahe Cachelist(i)
Call InnerHtml("UpdateInfo","更新 <b>"&cachelist(i)&"</b> 完成")
Next
Call InnerHtml("UpdateInfo","更新了"& UBound(cachelist)-1 &"个缓存对象<br>")
Else
Call InnerHtml("UpdateInfo","<b>当前站点全部缓存清理完成。</b>。")
End If
End Sub

Function GetallCache()
Dim Cacheobj
For Each Cacheobj in Application.Contents
GetallCache = GetallCache & Cacheobj & ","
Next
End Function

Sub DelCahe(MyCaheName)
Application.Lock
Application.Contents.Remove(MyCaheName)
Application.unLock
End Sub

Sub InnerHtml(obj,msg)
Response.Write "<li>"&msg&"</li>"
Response.Flush
End Sub
%>
 

 暂无标签
正在读取日志的评论数据,请稍后……
正在加载日志评论签写框,请稍后……
成员登录通道
正在载入成员登录通道...
添加文章到网摘

添加到网摘:

BLOG 日历助手
正在载入日历助手...
BLOG 分类列表
BLOG 统计信息
正在载入统计信息...
BLOG 站内搜索

BLOG 日志归档
BLOG 最新评论
{$SideComment}
BLOG 最新留言
{$SideGB}
BLOG 友情链接