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
ContainsContent(string)
Indicates if the cache contains content associated to the given ID.
public bool ContainsContent(string id)
Parameters
idstringThe ID of the content.
Returns
- bool
True if the cache has content for that ID, false otherwise.
RemoveContent(string)
Removes the content associated to the given ID in the cache.
public Task<bool> RemoveContent(string id)
Parameters
idstringThe ID of the content to remove.
Returns
RetrieveContent(string, CancellationToken)
Gets content associated to the given ID from the cache.
public Task<string> RetrieveContent(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe ID of the content to fetch.
cancellationTokenCancellationTokenThe cancellation token to use for that task.
Returns
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
idstringThe ID of the content to store.
contentstringThe content to store in the cache.
cancellationTokenCancellationTokenThe cancellation token to use for that task.