2 instantiations of CacheableKeyRing
Microsoft.AspNetCore.DataProtection (2)
KeyManagement\Internal\CacheableKeyRing.cs (1)
49return new CacheableKeyRing(CancellationToken.None, now + extension, KeyRing);
KeyManagement\KeyRingProvider.cs (1)
196return new CacheableKeyRing(
25 references to CacheableKeyRing
Microsoft.AspNetCore.DataProtection (25)
KeyManagement\Internal\CacheableKeyRing.cs (3)
34internal static bool IsValid([NotNullWhen(true)] CacheableKeyRing? keyRing, DateTime utcNow) 42/// Returns a new <see cref="CacheableKeyRing"/> which is identical to 'this' but with a 46internal CacheableKeyRing WithTemporaryExtendedLifetime(DateTimeOffset now)
KeyManagement\Internal\ICacheableKeyRingProvider.cs (1)
19CacheableKeyRing GetCacheableKeyRing(DateTimeOffset now);
KeyManagement\KeyRingProvider.cs (21)
22private CacheableKeyRing? _cacheableKeyRing; 24private Task<CacheableKeyRing>? _cacheableKeyRingTask; // Also covered by _cacheableKeyRingLockObj 81private CacheableKeyRing CreateCacheableKeyRingCore(DateTimeOffset now, IKey? keyJustAdded) 171private CacheableKeyRing CreateCacheableKeyRingCoreStep2(DateTimeOffset now, CancellationToken cacheExpirationToken, IKey defaultKey, IEnumerable<IKey> allKeys) 231CacheableKeyRing? existingCacheableKeyRing = null; 235if (CacheableKeyRing.IsValid(existingCacheableKeyRing, utcNow)) 257if (CacheableKeyRing.IsValid(existingCacheableKeyRing, utcNow)) 270CacheableKeyRing newCacheableKeyRing; 337var cached = Volatile.Read(ref _cacheableKeyRing); 338if (CacheableKeyRing.IsValid(cached, utcNow)) 344CacheableKeyRing? existingCacheableKeyRing = null; 345Task<CacheableKeyRing>? existingTask = null; 354if (CacheableKeyRing.IsValid(existingCacheableKeyRing, utcNow)) 380CacheableKeyRing newCacheableKeyRing; 432Debug.Assert(!CacheableKeyRing.IsValid(existingCacheableKeyRing, utcNow), "Should have returned a valid cached key ring above"); 458var newCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 480private IKeyRing? GetKeyRingFromCompletedTaskUnsynchronized(Task<CacheableKeyRing> task, DateTime utcNow) 495var newCacheableKeyRing = task.GetAwaiter().GetResult(); // Call GetResult to throw on failure 501var existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 502if (existingCacheableKeyRing is not null && !CacheableKeyRing.IsValid(existingCacheableKeyRing, utcNow)) 532CacheableKeyRing ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now)