FluidCacheConfig Interface
To use, import via @fluidframework/driver-web-cache/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface FluidCacheConfig
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
closeDbAfterMs | Alpha |
optional |
number | Each time db is opened, it will remain open for this much time. To improve perf, if this property is set as any number greater than 0, then db will not be closed immediately after usage. This value is in milliseconds. |
logger | Alpha |
optional |
ITelemetryBaseLogger | A logger that can be used to get insight into cache performance and errors |
maxCacheItemAge | Alpha |
number | A value in milliseconds that determines the maximum age of a cache entry to return. If an entry exists in the cache, but is older than this value, the cached value will not be returned. | |
partitionKey | Alpha |
string | null | A string to specify what partition of the cache you wish to use (e.g. a user id). Null can be used to explicity indicate no partitioning, and has been chosen vs undefined so that it is clear this is an intentional choice by the caller. A null value should only be used when the host can ensure that the cache is not able to be shared with multiple users. |
Property Details
closeDbAfterMs
Each time db is opened, it will remain open for this much time. To improve perf, if this property is set as any number greater than 0, then db will not be closed immediately after usage. This value is in milliseconds.
For more information about our API support guarantees, see here.
Signature
closeDbAfterMs?: number;
Type: number
logger
A logger that can be used to get insight into cache performance and errors
For more information about our API support guarantees, see here.
Signature
logger?: ITelemetryBaseLogger;
Type: ITelemetryBaseLogger
maxCacheItemAge
A value in milliseconds that determines the maximum age of a cache entry to return. If an entry exists in the cache, but is older than this value, the cached value will not be returned.
For more information about our API support guarantees, see here.
Signature
maxCacheItemAge: number;
Type: number
partitionKey
A string to specify what partition of the cache you wish to use (e.g. a user id). Null can be used to explicity indicate no partitioning, and has been chosen vs undefined so that it is clear this is an intentional choice by the caller. A null value should only be used when the host can ensure that the cache is not able to be shared with multiple users.
For more information about our API support guarantees, see here.
Signature
partitionKey: string | null;
Type: string | null