withPersistence

Method
📦 Aspire.Hosting.Valkey v17.0.0
interface ValkeyResource {
// ... omitted for brevity
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource;
}

Signature

methodwithPersistencebuilder
Configures a Valkey container resource for persistence.
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource
intervaltimespanoptionalThe interval between snapshot exports. Defaults to 60 seconds.
keysChangedThresholdnumberoptional= 1The number of key change operations required to trigger a snapshot at the interval. Defaults to 1.
ValkeyResource

Applies to

This method applies to the following types: