www.gusucode.com > 迅雷看看小偷电影程序源码+后台(首页去弹窗) > 迅雷看看小偷电影程序源码+后台(首页去弹窗)\code\guanli\CleanCache.asp

    <!--#include file="mima.asp"--><%

if session("islogin")<>LoginPassWord then
Response.Redirect "admin.asp"
End If

Call RemoveAllCache()

Sub RemoveAllCache()
Dim cachelist,i
Call InnerHtml("UpdateInfo","<b>正在清理当前站点缓存,请稍等...</b><br>")
Cachelist=split(GetallCache(),",")
If UBound(cachelist)>1 Then
For i=0 to UBound(cachelist)-1
DelCahe Cachelist(i)
Call InnerHtml("UpdateInfo","")
Next
Call InnerHtml("UpdateInfo","<b>共更新了"& UBound(cachelist)-1 &"个缓存对象</b><script language='javascript'> alert('当前站点缓存已经全部清理完毕');top.location='admin.asp'; </script>")
Else
Call InnerHtml("UpdateInfo","<b>当前站点缓存已经全部清理完毕。</b><script language='javascript'> alert('当前站点缓存已经全部清理完毕');top.location='admin.asp'; </script>")
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 msg
Response.Flush
End Sub
%>