You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@ It makes use of the TTL functionality to get remove the stale cache keys.
4
4
IDistributedCache is a low-level interface used by cache-related consumers, such as Polly. Microsoft also provides a set of extension methods that simplify common workflows.
5
5
6
6
## Considerations
7
-
7
+
- There is no optimistic locking(or locking of any kind). If this is a big problem, using a different provider(such as Redis with WATCH) might be better for your use case.
8
+
- Eventual consistency is used.
8
9
- Deleting DynamoDB items with an expired TTL takes up to 48 hours. There is a soft invalidation in the code to check whether the item has expired or not.
9
10
- Sliding expiration is WIP and experimental. It works in such a way that the TTL is refreshed(by the amount of the sliding expiration) when you do a GetCacheKey and the TTL is about to expire in (SlidingExpirationDuration / 2) seconds.
10
11
Example:
11
12
Sliding expiration is set to 30 mins.
12
13
The TTL is CurrentTime + 14 mins( < SlidingExpirationDuration / 2).
13
14
Doing a GET will refresh the TTL to CurrentTime + 14 mins + 30 mins.
14
15
A subsequent GET will not refresh the key until the condition is met again.
15
-
- While methods are thread-safe, data race conditions are possible. It's up to the caller to manage them correctly.
16
16
- Sync methods are disabled by default due to the fact that Amazon's DynamoDb client uses HttpClient internally, which lacks sync methods. There is an override that will enable them, but doing so is not recommended.
17
17
- The library is still **quite raw**. Any pull requests, ideas and feedback are encouraged.
0 commit comments