17 references to Add
Microsoft.Extensions.Caching.Hybrid.Tests (17)
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)
43
clock.
Add
(TimeSpan.FromSeconds(45)); // should still be fine from L1 (L1 has 1 minute expiration)
46
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)
49
clock.
Add
(TimeSpan.FromSeconds(45)); // should now be expired
PayloadTests.cs (6)
55
clock.
Add
(TimeSpan.FromSeconds(10));
84
clock.
Add
(TimeSpan.FromSeconds(58));
90
clock.
Add
(TimeSpan.FromSeconds(4));
118
clock.
Add
(TimeSpan.FromSeconds(2));
148
clock.
Add
(TimeSpan.FromSeconds(2));
185
clock.
Add
(TimeSpan.FromSeconds(2));