CacheCls缓存的应用(3)
Next
End If
End Sub
'统计字符Char在Str中出现的次数
Private Function CountInStr(Str,Char)
CountInStr = 0
Dim i, CharLen
CharLen = Len(Char)
For i = 1 to Len(Str)
If Mid(Str, i, CharLen) = Char Then CountInStr = CountInStr + 1
Next
End Function
End Class
Dim CachePro
Set CachePro = New CacheCls
'设置缓存“cexo255”和它的值:"cexo2551|cexo2552|cexo2553|cexo2554|cexo2555"
CachePro.Name = "cexo255"
CachePro.Value = "cexo2551|cexo2552|cexo2553|cexo2554|cexo2555"
'取当前缓存中的值
'CacheArr = CachePro.Value
CachePro.Name = "wxf"
CachePro.Value = "wxf"
CachePro.Name = "dw"
CachePro.Value = "dw"
'释放缓存cexo255
'CachePro.DelCahe("cexo255")
'释放所有缓存
'CachePro.RemoveAllCache
'取cexo255缓存中的值
CacheArr = CachePro.GetCacheValue("cexo255")
If isArray(CacheArr) Then
For i = 0 to UBound(CacheArr)
Response.Write CacheArr(i) & "<br>"
Next
Else
Response.Write "缓存被释放!!!"
End if
Set CachePro = Nothing
%>