Click or drag to resize
IProgressiveCache Interface
Provides optimization of parallel data loads. The data are loaded once, stored into cache and the result is shared.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax
C#
public interface IProgressiveCache

The IProgressiveCache type exposes the following members.

Methods
  NameDescription
Public methodLoadTData
Loads data. If multiple threads are loading the same data, only one thread executes the load, stores the result into cache and the result is distributed to other waiting threads. If an exception is thrown during loadDataFunc execution, the exception is distributed as well. No data are cached in such a case.
Public methodLoadAsyncTData(FuncCacheSettings, TaskTData, CacheSettings)
Asynchronously loads data. If multiple threads are loading the same data, only one thread executes the load, stores the result into cache and the result is distributed to other waiting threads. If an exception is thrown during loadDataFuncAsync execution, the exception is distributed as well. No data are cached in such a case.
Public methodLoadAsyncTData(FuncCacheSettings, CancellationToken, TaskTData, CacheSettings, CancellationToken)
Asynchronously loads data. If multiple threads are loading the same data, only one thread executes the load, stores the result into cache and the result is distributed to other waiting threads. If an exception is thrown during loadDataFuncAsync execution, the exception is distributed as well. No data are cached in such a case.
Top
Remarks
Use dependency on this interface rather than depending on static members of the CacheHelper class (e.g. CacheTData(FuncCacheSettings, TData, CacheSettings), CacheAsyncTData(FuncCacheSettings, CancellationToken, TaskTData, CacheSettings, CancellationToken) or CacheAsyncTData(FuncCacheSettings, TaskTData, CacheSettings)).
See Also