Skip to content

Commit 3e31c61

Browse files
dnltskderXear
authored andcommitted
changed ttl datatype from String to Number
1 parent d76c49a commit 3e31c61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/dasburo/spring/cache/dynamo/DefaultDynamoCacheWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private void putInternal(String name, String key, @Nullable byte[] value, @Nulla
216216
}
217217

218218
if (shouldExpireWithin(ttl)) {
219-
attributeValues.put(ATTRIBUTE_TTL, new AttributeValue().withS(String.valueOf(Instant.now().toEpochMilli() + ttl.toMillis())));
219+
attributeValues.put(ATTRIBUTE_TTL, new AttributeValue().withN(String.valueOf(Instant.now().toEpochMilli() + ttl.toMillis())));
220220
}
221221

222222
PutItemRequest putItemRequest = new PutItemRequest()

0 commit comments

Comments
 (0)