您当前的位置是:首页 >> 网站建设 >> 利用asp来清理站点的缓存的方法
  • 利用asp来清理站点的缓存的方法
  • 2008-8-10 14:53:20 中国WebSite网(网站制作) 

    <% 
    Call RemoveAllCache()

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


    Function GetallCache() 
        Dim Cacheobj 
       For Each Cacheobj in Application.Contents 
       GetallCache = GetallCache & Cacheobj & "," 
       Next 
    End Function  
      
    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 


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

  • 团队介绍
  • 联系我们
  • 网站地图
  • 建站流程
  • 本站关键词:网站制作 | 网站建设 | 北京网站制作 | 北京网站建设 | 做网站 | 北京做网站
    Copyright 2007-2008 中国Web网  All Rights reserved
    业务电话:15810436520 联系人:张冬行 E-mail:zhang-donghang@163.com
    联系地址:北京市海淀区南平庄164号
    京ICP备012345678号