This class is responsible for managing cached blobs within a local file system. It implements IBlobCache to store, fetch, and clear data.
More...
|
|
string | EncodeBlobEtagPath (string path) |
|
string | BlobEtagPath (string? blobPath) |
|
void | StoreBlobEtag (string blobPath, string? etag) |
|
string? | FetchBlobEtag (string blobPath) |
|
void | ClearBlobEtags (string? blobPath=null) |
| | FileBlobCache (string tempDir) |
| | FileBlobCache Constructor. Creates the necessary directory structure.
|
| string | GetAbsoluteFilePath (string path) |
| | Gets the absolute file path for a model associated with a specified relative path.
|
| async Task | Clear (string blobPath) |
| async Task | ClearAll (bool exceptHeld, DateTime? olderThan) |
| | Clears the entire cache based on the specified parameters. It can clear all files or only those older than a specific date and time, optionally preserving held blobs.
|
| async Task< OpResponse > | Fetch (RequestOp requestOp) |
| | Fetches a blob from the file cache based on the provided request operation.
|
| async Task< OpResponse > | Store (OpResponse opResponse) |
| | Stores the result of a given operation to the blob cache. If the result is empty, it deletes the corresponding file instead.
|
| async Task | NotifyBlobIsFresh (string blobPath, long arrivedAtMs) |
|
|
const string | BLOB_ETAGS = "BlobEtags" |
|
const string | BLOB_PATH_ALT_SEPARATOR = "_%_" |
|
| string | ToFilePath (string path) |
| | Transforms a relative path to an absolute file path based on _tempDir.
|
| string | GetBlobPath (string path) |
| | Constructs a path within the blob storage directory.
|
This class is responsible for managing cached blobs within a local file system. It implements IBlobCache to store, fetch, and clear data.
◆ FileBlobCache()
| Buzzware.Cascade.FileBlobCache.FileBlobCache |
( |
string | tempDir | ) |
|
|
inline |
FileBlobCache Constructor. Creates the necessary directory structure.
- Parameters
-
| tempDir | The base temporary directory used for storing blobs. |
◆ Clear()
| async Task Buzzware.Cascade.FileBlobCache.Clear |
( |
string | blobPath | ) |
|
|
inline |
◆ ClearAll()
| async Task Buzzware.Cascade.FileBlobCache.ClearAll |
( |
bool | exceptHeld, |
|
|
DateTime? | olderThan ) |
|
inline |
Clears the entire cache based on the specified parameters. It can clear all files or only those older than a specific date and time, optionally preserving held blobs.
- Parameters
-
| exceptHeld | Specifies if the held blobs should be excluded from deletion. |
| olderThan | Specifies the cutoff date for deleting files. Files older than this date will be deleted. |
Implements Buzzware.Cascade.IBlobCache.
◆ Fetch()
Fetches a blob from the file cache based on the provided request operation.
- Parameters
-
| requestOp | The request operation containing the request details including the required freshness. |
- Returns
- An OpResponse indicating the operation's result and associated data if the blob is found and valid.
Implements Buzzware.Cascade.IBlobCache.
◆ GetAbsoluteFilePath()
| string Buzzware.Cascade.FileBlobCache.GetAbsoluteFilePath |
( |
string | path | ) |
|
|
inline |
Gets the absolute file path for a model associated with a specified relative path.
- Parameters
-
| path | The relative path to the model file within the blob directory. |
- Returns
- The complete path to the model file as a string.
Implements Buzzware.Cascade.IBlobCache.
◆ GetBlobPath()
| string Buzzware.Cascade.FileBlobCache.GetBlobPath |
( |
string | path | ) |
|
|
inlineprotected |
Constructs a path within the blob storage directory.
- Parameters
-
| path | The path relative to the blob directory. |
- Returns
- The full path to the specified blob as a string.
◆ NotifyBlobIsFresh()
| async Task Buzzware.Cascade.FileBlobCache.NotifyBlobIsFresh |
( |
string | blobPath, |
|
|
long | arrivedAtMs ) |
|
inline |
◆ Store()
Stores the result of a given operation to the blob cache. If the result is empty, it deletes the corresponding file instead.
- Parameters
-
| opResponse | The response operation which includes the data to be stored or the command to delete. |
Implements Buzzware.Cascade.IBlobCache.
◆ ToFilePath()
| string Buzzware.Cascade.FileBlobCache.ToFilePath |
( |
string | path | ) |
|
|
inlineprotected |
Transforms a relative path to an absolute file path based on _tempDir.
- Parameters
-
| path | The relative path to append to the temporary directory base. |
- Returns
- The full file path as a string.
◆ Cascade
◆ SupportsGetAbsoluteFilePath
| bool Buzzware.Cascade.FileBlobCache.SupportsGetAbsoluteFilePath |
|
get |
The documentation for this class was generated from the following file:
- Buzzware.Cascade/FileBlobCache.cs