Table of Contents

Interface IResourceProviderResourceCacheService

Namespace
FoundationaLLM.Common.Interfaces
Assembly
FoundationaLLM.Common.dll

Provides the resource caching services used by FoundationaLLM resource providers.

public interface IResourceProviderResourceCacheService
Extension Methods

Methods

Reset()

Resets the cache.

void Reset()

SetValue<T>(ResourceReference, T)

Sets a resource value identified by a resource reference in the cache.

void SetValue<T>(ResourceReference resourceReference, T resourceValue) where T : ResourceBase

Parameters

resourceReference ResourceReference

The ResourceReference used as a key in the cache.

resourceValue T

The resource value to be set.

Type Parameters

T

The type of resource value to be set.

TryGetValue<T>(ResourceReference, out T?)

Tries to get a resource value identified by a resource reference from the cache.

bool TryGetValue<T>(ResourceReference resourceReference, out T? resourceValue) where T : ResourceBase

Parameters

resourceReference ResourceReference

The ResourceReference used as a key in the cache.

resourceValue T

The resource value to be retrieved.

Returns

bool

true is the resource value was found in the cache, false otherwise.

Type Parameters

T

The type of resource value to be retrieved.