Click or drag to resize
CacheHelper Class
Cache helper. Overridable helper
Inheritance Hierarchy
SystemObject
  CMS.BaseCoreMethods
    CMS.BaseAbstractHelper
      CMS.BaseAbstractHelperCacheHelper
        CMS.HelpersCacheHelper

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.2.23
Syntax
C#
public class CacheHelper : AbstractHelper<CacheHelper>

The CacheHelper type exposes the following members.

Constructors
  NameDescription
Public methodCacheHelper
Top
Methods
  NameDescription
Public methodStatic memberAdd(String, Object, CMSCacheDependency, DateTime, TimeSpan)
Mirror to Cache.Add().
Public methodStatic memberAdd(String, Object, CMSCacheDependency, DateTime, TimeSpan, CacheItemPriority, CacheItemRemovedCallback, Boolean)
Mirror to Cache.Add().
Protected methodAddInternal
Mirror to Cache.Add().
Public methodStatic memberAddOutputCacheDependencies
Adds the given keys as a dependency for current page output.
Public methodStatic memberAddPersistentDataType
Saves the persistent item to the file
Public methodStatic memberAddResponseCacheDependencies
Adds the given dependency cache keys to the Response cache.
Public methodStatic memberBuildCacheItemName
Builds the cache item name from the given parts
Public methodStatic memberCacheTData(FuncTData, CacheSettings)
Wraps the operation to a cached section. This method supports progressive caching and is able to distribute unhandled exceptions to other simultaneously running threads.
Public methodStatic memberCacheTData(FuncCacheSettings, TData, CacheSettings)
Wraps the operation to a cached section. This method supports progressive caching and is able to distribute unhandled exceptions to other simultaneously running threads.
Public methodStatic memberCacheEnabled
Returns true if the content caching is enabled.
Public methodStatic memberCacheImageAllowed
Checks if the file attachment is below the maximum file size used for caching.
Public methodStatic memberCacheImageEnabled
Returns true if the image caching is enabled.
Public methodStatic memberCacheImageMinutes
Cache image minutes.
Public methodStatic memberCacheMinutes
Cache content minutes.
Public methodStatic memberCachePageInfoEnabled
Returns true if the page info caching is enabled.
Public methodStatic memberCachePageInfoMinutes
Cache page info minutes.
Public methodStatic memberClearCache
Clears the entire system cache.
Public methodStatic memberClearCache(String, Boolean, Boolean)
Clears the cache content starting with given string
Public methodStatic memberClearCSSCache
Clear the CSS cache
Public methodStatic memberClearFileNodeCache
Clear the cache for the file document nodes.
Public methodStatic memberClearFullPageCache
Clear the full page cache (output cache) of the pages.
Protected methodClearFullPageCacheFilesInternal
Deletes all files in persistent file system cache (extension of output cache)
Protected methodClearFullPageCacheInternal
Clear the full page cache (output cache) of the pages.
Public methodStatic memberClearOutputCache
Clears the output cache for specific page.
Public methodStatic memberClearPageInfoCache
Clear the page info cache.
Public methodStatic memberClearPartialCache
Clear the partial cache (output cache) of the controls.
Public methodStatic memberClearURLRewritingCache
Clears the cache of the URL rewriting.
Public methodStatic memberClientCacheMinutes
Client cache minutes for the processed content (both files and pages).
Protected methodCreateCacheDependencyInternal
Creates the cache dependency with specified parameters
Public methodStatic memberDeletePersistent
Restores the persistent item from the cache
Protected methodDeletePersistentInternal
Restores the persistent item from the cache
Public methodStatic memberEnsureDummyKey
Ensures the dummy key with the given name
Public methodStatic memberEnsureKey
Ensures the specified cache key.
Public methodStatic memberEnsureOutputCacheDependencies
Ensures the dependency list for the given key, so the dependencies for current page output can be tracked. The dependencies are tracked automatically only when TrackCacheDependencies property is enabled.
Public methodStatic memberGetBaseCacheKey
Returns the base cache key (created with all parameters considered to be valid for proper caching).
Public methodStatic memberGetCacheDependencies
Processes the dependencies string. Returns default dependencies if the source is null or empty. If source is NO_CACHE_DEPENDENCY constant, then method also returns this constant. When source is specified and contains DEFAULT_CACHE_DEPENDENCIES constant, then this constant indicates that default dependencies should be appended to the source. The DEFAULT_CACHE_DEPENDENCIES also remains in the string so other processes can insert their default dependencies.
Public methodStatic memberGetCacheDependency(ListString)
Creates the cache dependency from the given keys.
Public methodStatic memberGetCacheDependency(String)
Creates the cache dependency from the given keys.
Public methodStatic memberGetCacheDependency(String)
Creates the cache dependency from the given keys.
Public methodStatic memberGetCacheDependency(ListString, ListString)
Creates the cache dependency from the given keys.
Public methodStatic memberGetCacheDependency(String, String)
Creates the cache dependency from the given keys.
Public methodStatic memberGetCacheItemName(String, Object)
Gets the cache item string.
Public methodStatic memberGetCacheItemName(Boolean, String, Object)
Gets the cache item string.
Public methodStatic memberGetCacheItemsString
Gets the cache items string (item names separated by semicolon)
Public methodStatic memberGetCombinedCacheItems
Gets combined cache items for setting and default items
Public methodStatic memberGetCultureCacheKey
Gets the cache key for current culture
Public methodStatic memberGetCultureCacheKey(String)
Gets the cache key for the given culture
Public methodStatic memberGetDependencyCacheKeys
Parses the string and returns the array of the cache dependency keys.
Protected methodGetEnumeratorInternal
Gets the enumerator for the cache items.
Public methodStatic memberGetFileCacheDependency
Creates the cache dependency from the given file path.
Protected methodGetFromPersistentFileInternalDataType
Gets the persistent item from file
Protected methodGetFullKeyInternal
Gets the full cache key with the prefix
Public methodStatic memberGetInnerValue
Gets the inner value for the cache item
Protected methodGetInternal
Gets the item from the cache.
Public methodStatic memberGetItem
Gets item from cache.
Protected methodGetPersistentFileName
Gets the persistent file name for the given cache key
Protected methodGetPersistentFilePathInternal
Gets the file name for the given cache key
Public methodStatic memberGetUserCacheKey
Gets the cache key for current user
Public methodStatic memberGetUserCacheKey(String)
Gets the cache key for current user the given user
Protected methodInsertInternal
Inserts the item into the cache.
Public methodStatic memberMaxCacheFileSize
Maximum size of the file that is allowed to be cached in kilobytes.
Public methodStatic memberRegisterAutomaticCallback
Registers the automatic callback that is executed at the specific time
Public methodStatic memberRegisterDependencyCallbackTTarget
Registers a cache callback for given list of cache dependencies
Public methodStatic memberRemove
Removes object from cache.
Public methodStatic memberRemoveDependencyCallback
Registers a cache callback for given list of cache dependencies
Protected methodRemoveInternal
Removes the item from the cache.
Public methodStatic memberRevalidateClientCache
Returns whether the client cache should be revalidated by the call to the server.
Protected methodSaveToPersistentFileInternalDataType
Saves the persistent item to the file
Public methodSetAsDefaultHelper
Sets this object as the default helper
(Inherited from AbstractHelperHelperType.)
Public methodStatic memberTouchKey(String)
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKey(String, Boolean, Boolean)
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKey(String, Boolean, Boolean, DateTime)
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKey(String, Boolean, Boolean, DateTime, Boolean)
Touches the cache key to drop the dependencies.
Protected methodTouchKeyInternal
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKeys(IEnumerableString)
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKeys(IEnumerableString, Boolean, Boolean)
Touches the cache key to drop the dependencies.
Public methodStatic memberTouchKeys(String, Boolean, Boolean)
Touches the cache keys separated by new line to drop the dependencies.
Protected methodTouchKeysInternal
Touches the cache key to drop the dependencies.
Public methodStatic memberTryGetItem(String, Object)
Returns true if the cache contains the item with specified key.
Public methodStatic memberTryGetItem(String, Boolean, Object)
Returns true if the cache contains the item with specified key.
Public methodStatic memberTryGetItemOutputType(String, OutputType)
Returns true if the cache contains the item with specified key.
Public methodStatic memberTryGetItemOutputType(String, Boolean, OutputType, Boolean)
Returns true if the cache contains the item with specified key.
Public methodStatic memberTryRestorePersistentDataType
Restores the persistent item from the cache
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Public fieldStatic memberCacheItemPriority
Cache item priority.
Public fieldStatic memberCSS_KEY
CSS caching key.
Public fieldStatic memberDEFAULT_CACHE_DEPENDENCIES
Default cache dependencies constant.
Public fieldStatic memberDUMMY_KEY
Dummy item.
Public fieldStatic memberFILENODE_KEY
File node caching key.
Public fieldStatic memberFULLPAGE_KEY
Full page caching key.
Protected fieldStatic membermProgressiveCaching
If true, progressive caching is enabled, meaning that two threads accessing the same code share the result of an internal operation
Public fieldStatic memberNO_CACHE_DEPENDENCIES
No cache dependencies constant.
Public fieldStatic memberPAGEINFO_KEY
Page info caching key.
Public fieldStatic memberPARTIAL_KEY
Partial cache key.
Public fieldStatic memberSEPARATOR
Cache item separator.
Public fieldStatic memberURLREWRITING_KEY
URL Rewriting cache key.
Top
Properties
  NameDescription
Public propertyStatic memberAllowCacheByCulture
If true, the cache allows separate keys by culture.
Public propertyStatic memberAllowCacheByUserName
If true, the cache allows separate keys by user name.
Public propertyStatic memberAlwaysCacheFiles
Gets if files are always cached on client, even outside the live site.
Public propertyStatic memberAlwaysCacheResources
Gets if resources are always cached on client, even outside the live site.
Public propertyStatic memberApplicationTerminating Obsolete.
Returns true if the application is terminating
Public propertyStatic memberBaseCacheKey
Returns the base cache key (created with all parameters considered to be valid for proper caching).
Public propertyStatic memberCacheURLRewritingMinutes
Cache URL rewriting minutes.
Public propertyStatic memberClientCacheRequested
Gets if the client specified cache settings in request.
Public propertyStatic memberCurrentCachePrefix
Current context name
Public propertyStatic memberCurrentRequestDependencyList
Current request dependency list, if set the list is used for the cache dependencies of the page output.
Public propertyStatic memberDependencyChanged
DependencyChanged items count (removed by the dependency).
Public propertyStatic memberExpired
Expired items count (removed by the system for expiration reasons).
Public propertyStatic memberMultiplePrefixesUsed
If true, multiple cache prefixes were used
Public propertyStatic memberPersistentDirectory
Persistent data directory.
Protected propertyPersistentDirectoryInternal
Persistent data directory.
Public propertyStatic memberPhysicalFilesCacheMinutes
Gets the expiration time in minutes that should be set for the physical files in the client cache.
Public propertyStatic memberProgressiveCaching
If true, progressive caching is enabled, meaning that two threads accessing the same code share the result of an internal operation
Public propertyStatic memberRemoved
Removed items count (removed correctly by the system).
Public propertyStatic memberTrackCacheDependencies
Returns true if the cache dependencies for the output cache are tracked.
Public propertyStatic memberUnderused
Underused items count (removed sooner for memory reasons).
Top
See Also