Some Values are saved as null in redis

560 views
Skip to first unread message

Neha Agarwal

unread,
Aug 24, 2022, 10:44:07 AM8/24/22
to Redis DB
I am using redis to store product data which i get from product API.Now sometimes redis is storing null again few fields despite they have a valid value.

Product API  response
{"sku":sku,1", "type":" mobile  ","returnType":"returnable","price":2}

In redis cache

{"sku":sku,1", "type":" mobile  ","returnType": returnable"}

This issue is happening for few products only.

Dmitry N. Medvedev

unread,
Aug 25, 2022, 7:58:30 AM8/25/22
to redi...@googlegroups.com
hi Neha,

1. redis stores whatever you give it to store;
2. there's no notion of null value in Redis -- all values are strings. So, if you don't see the price field stored, then you haven't passed that field to Redis

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/f85e16d7-1076-4088-9e91-1114260dff29n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages