Table of Contents

Class NoContentCache

Namespace
Homa.Sdk.Foundation
Assembly
Homa.Sdk.Foundation.dll

Does not cache content.

public class NoContentCache : IContentCache
Inheritance
NoContentCache
Implements
Inherited Members

Methods

Clear()

Removes all cached content from the cache.

public Task Clear()

Returns

Task

RemoveContent(string)

Removes the content associated to the given ID in the cache.

public Task<bool> RemoveContent(string id)

Parameters

id string

The ID of the content to remove.

Returns

Task<bool>

True if any content was removed, false otherwise

RetrieveContent(string, CancellationToken)

Gets content associated to the given ID from the cache.

public Task<string> RetrieveContent(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the content to fetch.

cancellationToken CancellationToken

The cancellation token to use for that task.

Returns

Task<string>

The content associated to the ID, or null if it is not in the cache.

StoreContent(string, string, CancellationToken)

Sets the content associated to the given ID in the cache.

public Task StoreContent(string id, string content, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the content to store.

content string

The content to store in the cache.

cancellationToken CancellationToken

The cancellation token to use for that task.

Returns

Task