<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.0.0" />

LazyTableCache<TDictionaryKey, TDictionaryValue, TFactoryData>

public abstract class LazyTableCache<TDictionaryKey, TDictionaryValue, TFactoryData>
Base implementation for storing table data in the Instance.
protected abstract TimeSpan ExpirationTimeSpan { get; }

Gets the length of time until expiration.

protected abstract ExpirationType ExpirationType { get; }

Gets the expiration type of the values in this cache.

protected virtual bool WaitForOperationCompletionOnTimeout { get; }

Gets whether or not the cache should wait until the CacheItemFactory completes when the MaxValueFactoryExecutionTime limit has been exceeded.

protected LazyTableCache()

Initializes a new instance of LazyTableCache.

protected abstract IDictionary<TDictionaryKey, TDictionaryValue> CacheItemFactory(int workspaceArtifactID, TFactoryData factoryData, CancellationToken cancellationToken)

Gets or sets the function that retrieves the specified cache value if it is not present.

protected virtual string CacheKey(int workspaceArtifactID)

Generates the cache key associated with the specified workspace artifact id.

protected virtual TDictionaryValue CacheMissBehavior(TFactoryData factoryData, int workspaceArtifactID, TDictionaryKey cacheIdentifier)

Gets the max execution time allowed while retrieving data from the cache.

protected virtual CancellationTokenRegistration RegisterCancellation(int workspaceArtifactID, TFactoryData factoryData, CancellationToken cancellationToken)

public void Remove(int workspaceArtifactID)

Removes the cache entry associated with the specified workspace id.

public IDictionary<TDictionaryKey, TDictionaryValue> RetrieveAll(TFactoryData factoryData, int workspaceArtifactID)

Gets a dictionary representation of the cache item associated with the specified workspace id.

public TDictionaryValue RetrieveValueByIdentifier(TFactoryData factoryData, int workspaceArtifactID, TDictionaryKey cacheIdentifier)

Gets the value associated with the specified cache key.