Different behaviour on Simple key-value storage and hash storage

17 views
Skip to first unread message

Atul Yaduvanshi

unread,
Oct 18, 2022, 11:23:33 AM10/18/22
to Redis DB
Hi all,
I am using AWS Redis service along with lambda for my notifications service.
The number of invocations for lambda is close to  (400/sec).
So when that lambda is invoked with some data..it checks for a key(based on the data)
and if that key is present in cache then it decides not to send notification and if that key is not present then it decides to send that notification.
So firstly we stored data in Redis Cache in simple key-value format, so what happens is when we use "get" function then sometimes it returns that the key is not present in cache even if the key is present(also i think it is a random behavior).
But if we store our data in hashes, then always returns the correct value.
Does anyone have any idea about this behavior?
PS: I am using python language
Thanks in advance for the help.
Best Regards,
Atul Yaduvanshi
Reply all
Reply to author
Forward
0 new messages