Show / Hide Table of Contents

Class WMMemoryCache

Provides application-wide access to memory caching.

Inheritance
object
MemoryCache
WMMemoryCache
Implements
IMemoryCache
IDisposable
Inherited Members
MemoryCache.Clear()
MemoryCache.Compact(double)
MemoryCache.CreateEntry(object)
MemoryCache.Dispose()
MemoryCache.Dispose(bool)
MemoryCache.GetCurrentStatistics()
MemoryCache.Remove(object)
MemoryCache.TryGetValue(object, out object)
MemoryCache.Count
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.App
Assembly: WMServer.dll
Syntax
public class WMMemoryCache : MemoryCache, IMemoryCache, IDisposable

Constructors

WMMemoryCache(MemoryCacheOptions)

Declaration
public WMMemoryCache(MemoryCacheOptions opt)
Parameters
Type Name Description
MemoryCacheOptions opt

Methods

CacheObject(string, object, CacheIndices)

Attempts to cache the given dataSource to the memory cache.

Declaration
public static void CacheObject(string ID, object obj, WMMemoryCache.CacheIndices cacheIndex)
Parameters
Type Name Description
string ID

The ID to cache under

object obj

The dataSource to be cached

WMMemoryCache.CacheIndices cacheIndex

The cache index that this object should be cached under

DeleteCachedObject(string, CacheIndices)

Called whenever a cache is changed. This will cause the cached model to be deleted, if it exists.

Declaration
public static void DeleteCachedObject(string ID, WMMemoryCache.CacheIndices cacheIndex)
Parameters
Type Name Description
string ID

The key to search under

WMMemoryCache.CacheIndices cacheIndex

The cache index that this object should be deleted under

TryGetCachedObject<T>(string, out T, CacheIndices)

Attempts to find and return the cached dataSource with the given ID.

Declaration
public static bool TryGetCachedObject<T>(string ID, out T obj, WMMemoryCache.CacheIndices cacheIndex) where T : class, new()
Parameters
Type Name Description
string ID

The ID the dataSource is cached against

T obj

The dataSource to be returned.

WMMemoryCache.CacheIndices cacheIndex

The cache index that this object should be searched for under

Returns
Type Description
bool

True if the dataSource is found, false if not.

Type Parameters
Name Description
T

Implements

IMemoryCache
IDisposable
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE