Skip to content
Docs Try Aspire
Docs Try

PersistenceMode

Enum net8.0
📦 Aspire.Hosting v13.4.0
Persistence modes for resources that support lifetime configuration.
namespace Aspire.Hosting.ApplicationModel;
public enum PersistenceMode
Session = 0
Create the resource when the app host process starts and dispose of it when the app host process shuts down.
Persistent = 1
Attempt to re-use a previously created resource if one exists. Do not destroy the resource on app host process shutdown.
Resource = 2
Match another resource's persistence behavior.
ParentProcess = 3
Use persistent behavior scoped to a parent process identity.