IThreadSafeCacheAccessorTKey, TValue Interface

Represents a thread-safe accessor for a cache, which provides a read-only indexer to access values. An instance can be created by the Create methods of the ThreadSafeCacheFactory class, or if you have a CacheTKey, TValue instance, you can retrieve a thread-safe accessor for it by the GetThreadSafeAccessor method.


Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
public interface IThreadSafeCacheAccessor<in TKey, out TValue>

Type Parameters

The type of the key in the cache.
The type of the value in the cache.


Item Gets the value associated with the specified key. If a value does not exist in the underlying cache, then the loader delegate will be invoked, which was specified when this IThreadSafeCacheAccessorTKey, TValue instance was created.

See Also