File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 55
66namespace Microsoft . DurableTask . Worker . Grpc ;
77
8+ /// <summary>
9+ /// A cache for extended sessions that wraps an <see cref="IMemoryCache"/> instance.
10+ /// Responsible for holding <see cref="ExtendedSessionState"/> for orchestrations that are running within extended sessions.
11+ /// </summary>
812public class ExtendedSessionsCache
913{
10- private IMemoryCache ? extendedSessions ;
14+ IMemoryCache ? extendedSessions ;
1115
12- internal IMemoryCache GetOrInitializeCache ( double extendedSessionIdleTimeoutInSeconds )
16+ /// <summary>
17+ /// Gets the cache for extended sessions if it has already been initialized, or otherwise initializes it with the given expiration scan frequency.
18+ /// </summary>
19+ /// <param name="expirationScanFrequencyInSeconds">
20+ /// The expiration scan frequency of the cache, in seconds. T
21+ /// This specifies how often the cache checks for stale items, and evicts them.
22+ /// </param>
23+ /// <returns>The IMemoryCache that holds the cached <see cref="ExtendedSessionState"/>.</returns>
24+ internal IMemoryCache GetOrInitializeCache ( double expirationScanFrequencyInSeconds )
1325 {
1426 this . extendedSessions ??= new MemoryCache ( new MemoryCacheOptions
1527 {
16- ExpirationScanFrequency = TimeSpan . FromSeconds ( extendedSessionIdleTimeoutInSeconds ) ,
28+ ExpirationScanFrequency = TimeSpan . FromSeconds ( expirationScanFrequencyInSeconds ) ,
1729 } ) ;
1830
1931 return this . extendedSessions ;
You can’t perform that action at this time.
0 commit comments