基本的缓存类操作封装(抽象类)

 

Imports  System
Imports  System.Web
Imports  System.Web.Caching

Namespace  DRMSystem.Common.Caching
    
Public   MustInherit   Class  DataCacheAbstract
#Region  "Abstract Methods"

        
Public   MustOverride   Function  CreateSqlTableCacheDependency( ByVal  ConfigDataBaseName  As   String ByVal  ConfigTableName  As   String As  AggregateCacheDependency
        
Public   MustOverride   Function  CreateFileCacheDependency( ByVal  FileName  As   String As  AggregateCacheDependency

        
Public   MustOverride   Function  GetCache( ByVal  Key  As   String As   Object

        
Public   MustOverride   Sub  Remove( ByVal  Key  As   String )

        
Public   MustOverride   Sub  Clear()

        
Public   MustOverride   Function  Add( ByVal  Key  As   String ByVal  Value  As   Object ByVal  Dependencies  As  CacheDependency,  ByVal  AbsoluteExpiration  As  DateTime,  ByVal  SlidingExpiration  As  TimeSpan,  ByVal  Priority  As  CacheItemPriority,  ByVal  OnRemoveCallback  As  CacheItemRemovedCallback)  As   Object

        
Public   MustOverride   Sub  Insert( ByVal  Key  As   String ByVal  Value  As   Object )
        
Public   MustOverride   Sub  Insert( ByVal  Key  As   String ByVal  Value  As   Object ByVal  Dependencies  As  CacheDependency)
        
Public   MustOverride   Sub  Insert( ByVal  Key  As   String ByVal  Value  As   Object ByVal  Dependencies  As  CacheDependency,  ByVal  AbsoluteExpiration  As  DateTime,  ByVal  SlidingExpiration  As  TimeSpan)
        
Public   MustOverride   Sub  Insert( ByVal  Key  As   String ByVal  Value  As   Object ByVal  Dependencies  As  CacheDependency,  ByVal  AbsoluteExpiration  As  DateTime,  ByVal  SlidingExpiration  As  TimeSpan,  ByVal  Priority  As  CacheItemPriority,  ByVal  OnRemoveCallback  As  CacheItemRemovedCallback)

#End Region
    
End Class
End Namespace

你可能感兴趣的:(ASP.net,(2.0),For,VB.net,Winforms,For,VB.Net,2005)