复制代码 代码如下:
<%
Rem =================================================================
Rem = 类:CacheCls
Rem = 说明:缓存的应用
Rem = Revision:1.01 Beta
Rem = 作者:熊氏英雄(cexo255)
Rem = Date:2005/05/6 18:38:10
Rem = QQ:30133499
Rem = MySite:Http://www.Relaxlife.net
Rem = 下载:Http://www.Relaxlife.net/cexo/Cache_pro.rar
Rem = QQ群:4341998
Rem = 适用:对一些常用到,而又不常改变的数据放入缓存中,调用速度要比每次都要从数据库中读要快N陪
Rem =================================================================
CacheName = "RL"
Class CacheCls
Private LocalCacheName, Cache_Data
Public Property Let Name(ByVal vNewValue)
LocalCacheName = LCase(vNewValue)
Cache_Data=Application(CacheName & "_" & LocalCacheName)
End Property
Public Property Let Value(ByVal vNewValue)
Dim N,i,NewValueArr
If LocalCacheName<>"" Then
N = CountInStr(vNewValue,"|")
NewValueArr = Split(vNewValue,"|",-1,1)
ReDim Cache_Data(N)
For i = 0 to N
Cache_Data(i) = NewValueArr(i)
Next
Application.Lock
Application(CacheName & "_" & LocalCacheName) = Cache_Data
Application.unLock
Else
Response.Write "设置缓存出错,或缓存名不能为空,请重新更新缓存"
Response.End()
End If
End Property
内容版权声明:除非注明,否则皆为本站原创文章。