Cascade
Loading...
Searching...
No Matches
Buzzware.Cascade.ICascadeCache Interface Reference

Interface for one cache layer. More...

Inheritance diagram for Buzzware.Cascade.ICascadeCache:
Buzzware.Cascade.ModelCache

Public Member Functions

Task< OpResponseFetch (RequestOp requestOp)
 Fetches a cached response for a given request operation.
Task< OpResponseStore (OpResponse opResponse)
 Stores the given operation response in the cache.
Task Store (Type type, object id, object model, long arrivedAt)
 Stores a model in the cache.
Task StoreCollection (Type type, string key, IEnumerable? ids, long arrivedAt)
 Stores a collection of model ids in the cache.
string? GetBlobAbsoluteFilePath (string blobPath)
 Given a blob path (always relative) return an absolute local file system path for that blob.
Task ClearAll (bool exceptHeld=true, DateTime? olderThan=null)
Task ClearByType (Type type, bool exceptHeld=true, DateTime? olderThan=null)
Task ClearBlobs (bool exceptHeld=true, DateTime? olderThan=null)
Task ClearBlob (string path)
Task NotifyBlobIsFresh (string blobPath, long arrivedAtMs)
 Set the ArrivedAtMs value for the given blobPath to the given value. This is not absolutely necessary but for maximum efficiency should be implemented. It is only used when eTags indicate that a local blob is still fresh.

Properties

CascadeDataLayer Cascade [get, set]
 Cascade reference.
bool SupportsBlobs [get]
bool SupportsGetBlobAbsoluteFilePath [get]

Detailed Description

Interface for one cache layer.

Member Function Documentation

◆ ClearAll()

Task Buzzware.Cascade.ICascadeCache.ClearAll ( bool exceptHeld = true,
DateTime? olderThan = null )

Clears stored data from the cache. Removes all entries currently held except those that need to be held. Optionally clears entries older than a specified DateTime.

Parameters
exceptHeldIf true, entries marked to be held will not be cleared.
olderThanIf specified, only entries older than this date will be cleared.

Implemented in Buzzware.Cascade.ModelCache.

◆ Fetch()

Task< OpResponse > Buzzware.Cascade.ICascadeCache.Fetch ( RequestOp requestOp)

Fetches a cached response for a given request operation.

Parameters
requestOpThe operation representing the request, which is used to locate the cached value
Returns
The operation response

Implemented in Buzzware.Cascade.ModelCache.

◆ GetBlobAbsoluteFilePath()

string? Buzzware.Cascade.ICascadeCache.GetBlobAbsoluteFilePath ( string blobPath)

Given a blob path (always relative) return an absolute local file system path for that blob.

Parameters
blobPath
Returns

Implemented in Buzzware.Cascade.ModelCache.

◆ NotifyBlobIsFresh()

Task Buzzware.Cascade.ICascadeCache.NotifyBlobIsFresh ( string blobPath,
long arrivedAtMs )

Set the ArrivedAtMs value for the given blobPath to the given value. This is not absolutely necessary but for maximum efficiency should be implemented. It is only used when eTags indicate that a local blob is still fresh.

Parameters
blobPath
arrivedAtMs
Returns

Implemented in Buzzware.Cascade.ModelCache.

◆ Store() [1/2]

Task< OpResponse > Buzzware.Cascade.ICascadeCache.Store ( OpResponse opResponse)

Stores the given operation response in the cache.

Parameters
opResponseThe response from an operation that includes data to be cached.

Implemented in Buzzware.Cascade.ModelCache.

◆ Store() [2/2]

Task Buzzware.Cascade.ICascadeCache.Store ( Type type,
object id,
object model,
long arrivedAt )

Stores a model in the cache.

Parameters
typeThe type of the model to store.
idThe unique identifier for the model being cached.
modelThe actual model object to be cached.
arrivedAtTimestamp of when the model data arrived from the origin

Implemented in Buzzware.Cascade.ModelCache.

◆ StoreCollection()

Task Buzzware.Cascade.ICascadeCache.StoreCollection ( Type type,
string key,
IEnumerable? ids,
long arrivedAt )

Stores a collection of model ids in the cache.

Parameters
typeThe type of models in the collection to be cached.
keyA string key to reference the cached collection.
idsThe identifiers of the models contained in the collection.
arrivedAtTimestamp indicating when this collection was cached.

Property Documentation

◆ Cascade

CascadeDataLayer Buzzware.Cascade.ICascadeCache.Cascade
getset

Cascade reference.

Implemented in Buzzware.Cascade.ModelCache.


The documentation for this interface was generated from the following file:
  • Buzzware.Cascade/interfaces/ICascadeCache.cs