Click or drag to resize

CacheHelper Class

Helper class for accessing cache data. Tip! In general you should use the ControllerBase.GetFromCacheIfPresent method to work with the cache instead of using the CacheHelper. Important! the cache keys used with the CacheHelper must always either include the OISInstanceGUID or a hash of the master connstr to avoid conflicts in the integrity tests and/or if the master database contains multiple ES databases. The only exception is if it is absolutely certain the the cached data is the same across all instances (like e.g. the presence of a file).
Inheritance Hierarchy
SystemObject
  Omada.OE.Model.HelperCacheHelper

Namespace:  Omada.OE.Model.Helper
Assembly:  Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntax
C#
public class CacheHelper

The CacheHelper type exposes the following members.

Constructors
  NameDescription
Public methodCacheHelper
Top
Properties
  NameDescription
Public propertyStatic memberCache
Public propertyItem
Public propertyItemCount
No. of items in the cache.
Top
Methods
  NameDescription
Public methodAdd(String, Object, DateTime)
Public methodAdd(String, Object, TimeSpan)
Public methodFlush
Removes the 100% of cache entries from the cache object
Public methodStatic memberFlushAllCaches
Public methodRemove
Expires the cache object with the provided key
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
See Also