Click or drag to resize

CacheController Class

The controller which is the central place where caches live. Use this class to register a cache for a given connection string.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesCacheController

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.5.0.0 (5.5.18.1019)
Syntax
public static class CacheController

The CacheController type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCacheResultset(CacheKey, String, TimeSpan, CachedResultset)
Caches the resultset specified under the key specified in the cache related to the connection string for the duration specified.
Public methodStatic memberCacheResultset(CacheKey, String, TimeSpan, CachedResultset, Boolean)
Caches the resultset specified under the key specified in the cache related to the connection string for the duration specified.
Public methodStatic memberCacheResultset(CacheKey, String, TimeSpan, CachedResultset, Boolean, String)
Caches the resultset specified under the key specified in the cache related to the connection string for the duration specified.
Public methodStatic memberGetCachedResultset(CacheKey)
Gets the cached resultset for the key - empty-string combination.
Public methodStatic memberGetCachedResultset(CacheKey, String)
Gets the cached resultset for the key - connectionstring combination. If no cache is registered for the connection string, the empty string is retried
Public methodStatic memberGetCachedResultsets(String)
Gets the cached resultsets for the tag - emptyh string combination.
Public methodStatic memberGetCachedResultsets(String, String)
Gets the cached resultsets for the tag - connectionstring combination. If no cache is registered for the connection string, the empty string is retried
Public methodStatic memberGetRegisteredCache
Gets the registered cache.
Public methodStatic memberPurgeResultsets(String)
Purges the resultsets cached with the tag specified from the cache registered under the empty string.
Public methodStatic memberPurgeResultsets(String, String)
Purges the resultsets cached with the tag specified from the cache registered under the connectionstring specified.
Public methodStatic memberRegisterCache
Registers the cache specified under the connection string specified.
Top
Fields
  NameDescription
Public fieldStatic memberCachingEnabled
If set to true (default) the caching system works as expected. If set to false, no resultsets are cached. Set to false when caching is undesired (e.g. during debugging). Global setting.
Public fieldStatic memberThrowExceptionWhenCacheNotAvailable
If set to true the controller will throw an InvalidOperationException when a caching attempt is made for a cache which isn't registered. If false (default), the caching attempt for a cache which doesn't exist will result in a no-op. Set to true during testing/debug to see whether you're trying to cache data in non-existing caches.
Top
Remarks
Thread safe
See Also