如何清理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
%>
相关文档:
ASP高级技术精选集
一、GetRows的使用方法:
<%
Set conn=Server.CreateObject("Adodb.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("test.mdb")
Set Rs=Server.CreateObject("Adodb.Recordset")
Rs.Open "Select Top 2 * from 表名",conn,0,1 &nb ......
add.html
<html>
<head>
<title>无组件上传</title>
</head>
<body>
<form method="POST" name="myform" action="xSave.asp" target="_self">
<input name="PicPath" type="text" id="PicPath" readonly="true">
<input name="sPicPath" type="hidden" id="sPi ......
一、修改格式:调整表头居左;
<!--原来格式-->
/*说明:把整个表头和页面内容居中,当页面内容较长时,表头也居中,看起来像表头错位。*/
<div style="position: absolute;top:3px;">
<center>
<!--#include file="inc/glfcd.inc"-->
<br>
标题
</br& ......
探索软件工作室长期专业承接中小型商业软件或网站,最优惠的价格和高质量的服务期待您的惠顾!
本工作室承接 JSP ASP VB PB LotusNotes 等语言要求的应用系统开发业务
java jsp实战源程序代码:
......