Does set_key_expiration immediately clear the cache once the key is expired?
set_key_expiration
No it does not, as DynamoDB's Time to Live is within 48 hours after the key expiration in which items past their expiration can still be updated.