21 references to Add
Microsoft.Extensions.Caching.Hybrid.Tests (21)
DistributedCacheTests.cs (8)
81
Clock.
Add
(TimeSpan.FromMinutes(4));
86
Clock.
Add
(TimeSpan.FromMinutes(2));
127
Clock.
Add
(TimeSpan.FromMinutes(4));
132
Clock.
Add
(TimeSpan.FromMinutes(2));
195
Clock.
Add
(TimeSpan.FromMinutes(4));
200
Clock.
Add
(TimeSpan.FromMinutes(2));
257
Clock.
Add
(TimeSpan.FromMinutes(4));
262
Clock.
Add
(TimeSpan.FromMinutes(2));
ExpirationTests.cs (3)
44
clock.
Add
(TimeSpan.FromSeconds(45)); // should still be fine from L1 (L1 has 1 minute expiration)
47
clock.
Add
(TimeSpan.FromSeconds(45)); // should still be fine from L2 (L1 now expired, but fetches from L2 and detects 0:30 remaining, which limits L1 to 0:30)
50
clock.
Add
(TimeSpan.FromSeconds(45)); // should now be expired
FactoryOptionsTests.cs (1)
188
clock.
Add
(TimeSpan.FromSeconds(45));
L2Tests.cs (2)
175
clock.
Add
(TimeSpan.FromSeconds(1));
178
clock.
Add
(TimeSpan.FromSeconds(1));
PayloadTests.cs (7)
57
clock.
Add
(TimeSpan.FromSeconds(10));
195
clock.
Add
(TimeSpan.FromSeconds(58));
201
clock.
Add
(TimeSpan.FromSeconds(4));
235
clock.
Add
(TimeSpan.FromSeconds(2));
271
clock.
Add
(TimeSpan.FromSeconds(2));
314
clock.
Add
(TimeSpan.FromSeconds(2));
584
clock.
Add
(TimeSpan.FromSeconds(10));