Interface IContentCache<TContent>
Interface for an object that can efficiently cache IContentReference objects for a given endpoint and content type.
Namespace: Tableau.Migration.Content.Search
Assembly: Tableau.Migration.dll
Syntax
public interface IContentCache<TContent> : IContentReferenceCache where TContent : class, IContentReference
Type Parameters
Name | Description |
---|---|
TContent |
Remarks
Implementations should be thread safe due to parallel migration processing.
Methods
AddOrUpdate(TContent)
Adds or updates the content item in the cache.
Declaration
TContent AddOrUpdate(TContent item)
Parameters
Type | Name | Description |
---|---|---|
TContent | item | The content item. |
Returns
Type | Description |
---|---|
TContent | The added or updated content item. |
AddOrUpdateRange(IEnumerable<TContent>)
Adds or updates the content items in the cache.
Declaration
IImmutableList<TContent> AddOrUpdateRange(IEnumerable<TContent> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TContent> | items | The content items. |
Returns
Type | Description |
---|---|
IImmutableList<TContent> | The added or updated content items. |
ForIdAsync(Guid, CancellationToken)
Finds the content item for a given endpoint ID.
Declaration
Task<TContent?> ForIdAsync(Guid id, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<TContent> | The content item, or null if no item was found. |
ForLocationAsync(ContentLocation, CancellationToken)
Finds the content item for a given endpoint location.
Declaration
Task<TContent?> ForLocationAsync(ContentLocation location, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentLocation | location | The location. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<TContent> | The content item, or null if no item was found. |
ForReferenceAsync(IContentReference, CancellationToken)
Finds the TContent
item for a given IContentReference.
Declaration
Task<TContent?> ForReferenceAsync(IContentReference reference, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | reference | The content reference. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<TContent> | The |