A local static cache implementation (in-memory ONLY) for a single instance (really not shared) for SMALL objects. This is typically used for small objects such as grid/propertylist definition files.
The cache can be cleared explicitly using the Control Panel and there is a configurable cache expiration time after which the entry is removed (see AppSettings.json YetaWF_Caching:SmallObjectCacheDuration defined in minutes. 0 no expiration, -1 don't cache, any other value is the cache duration in minutes.
In development/debug objects are not cached, for release mode the default is caching that doesn't expire.
public class StaticSmallObjectLocalDataProvider : YetaWF.Core.IO.ICacheDataProvider, YetaWF.Core.IO.ICacheClearable;
|AddAsync||Adds an object to the cache.|
|ClearAllAsync||Clears the cache completely.|
|Dispose||Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.|
|Equals||Determines whether the specified object is equal to the current object.|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.|
|GetAsync||Retrieves a cached object.|
|GetHashCode||Serves as the default hash function.|
|GetType||Gets the Type of the current instance.|
|MemberwiseClone||Creates a shallow copy of the current Object.|
|ReferenceEquals||Determines whether the specified Object instances are the same instance.|
|RemoveAsync||Removes the cached object.|
|ToString||Returns a string that represents the current object.|