Skip to content

Commit

Permalink
Cache effects task in ControlPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Aug 2, 2024
1 parent c91e4f2 commit 077fedc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Core/Cleipnir.ResilientFunctions/Domain/ControlPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ internal BaseControlPanel(
public DateTime LeaseExpiration { get; private set; }

public ExistingMessages Messages { get; private set; }
public Task<ExistingEffects> Effects => _invocationHelper.CreateExistingEffects(FlowId);

private Task<ExistingEffects>? _effects;
public Task<ExistingEffects> Effects => _effects ??= _invocationHelper.CreateExistingEffects(FlowId);

public ExistingStates States { get; private set; }
public Correlations Correlations { get; private set; }

Expand Down

0 comments on commit 077fedc

Please sign in to comment.