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
+3-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,9 @@ Then you can inject it through Microsoft's DI container. Example:
13
13
services.AddDynamoDbCache(
14
14
o =>
15
15
{
16
-
o.TableName = "CustomerSubscriptions-Caching";
16
+
o.TableName = "CustomerSubscriptions-Caching"; //The name of the DynamoDb table where the caching resides
17
+
o.KeyColumnName = "key"; //This will be the partition key of your table. Make sure it has the same name in your infra code.
18
+
o.TimeToLiveColumnName = "ttl_value"; //This will be the TTL column of your table. Make sure the TTL functionality is enabled and points to this exact same attribute name.
17
19
});
18
20
That's it! This will be injected as a singleton. Afterwards, you have access to the IDistributedCache in your application.
19
21
Bear in mind, this has a dependency on AmazonDynamoDBClient client.
0 commit comments