Rem = MaxCount 缓存对象的最大值,超过则自动删除使用次数少的对象。缺省值为300 = Rem = CacheName 缓存组的总名称,缺省值为"Dvbbs",如果一个站点中有超过一个缓存组,则需要外部改变这个值。 = Rem = 属性:Name 定义缓存对象名称,只写属性。 = Rem = 属性:value 读取和写入缓存数据。 = Rem = 函数:ObjIsEmpty()判断当前缓存是否过期。 = Rem = 方法:DelCahe(MyCaheName)手工删除一个缓存对象,参数是缓存对象的名称。 = Rem ================================================================ Public Reloadtime,MaxCount,CacheName Private LocalCacheName,CacheData,DelCount Private Sub Class_Initialize() Reloadtime=14400 CacheName="Dvbbs" End Sub Private Sub SetCache(SetName,NewValue) Application.Lock Application(SetName) = NewValue Application.unLock End Sub Private Sub makeEmpty(SetName) Application.Lock Application(SetName) = Empty Application.unLock End Sub Public Property Let Name(ByVal vNewValue) LocalCacheName=LCase(vNewValue) End Property Public Property Let Value(ByVal vNewValue) If LocalCacheName<>"" Then CacheData=Application(CacheName&"_"&LocalCacheName) If IsArray(CacheData) Then CacheData(0)=vNewValue |