Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithPersistence

Method
📦 Aspire.Hosting.Valkey v17.0.0
func (ValkeyResource) WithPersistence(options ...*WithPersistenceOptions) ValkeyResource

Signature

methodWithPersistencebuilder
Configures a Valkey container resource for persistence.
WithPersistence(options ...*WithPersistenceOptions) ValkeyResource
options...*WithPersistenceOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPersistenceOptions argument.

Interval*float64The interval between snapshot exports. Defaults to 60 seconds.
KeysChangedThreshold*float64The number of key change operations required to trigger a snapshot at the interval. Defaults to 1.
ValkeyResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: