Can we do partial updating if cache is a json string. Also does cache supports other data types like List JSON apart from string
@Redisinc Жыл бұрын
If you are caching strings, partial updating has to be done outside of Redis. You would GET the stringified JSON from Redis, parse it, merge the changes, then SET back to Redis. If you are caching JSON using Redis Stack then you can do partial updates. Lookup the JSON.SET command to understand how to accomplish this, it allows partial updates using a path. For embedded lists within JSON, partial updates are more tricky but possible. There is a dedicated subset of JSON array commands: JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRTRIM, and JSON.ARRPOP.
@amarjitkumar8523 Жыл бұрын
Thank you for the awesome video. I am using redis and mongodb in my application for curd operation. Calling mongodb asynchronously on any operation performed on redis, everything is working fine except get. In case of 'get' if data found in redis its fine, otherwise misskey will happen and call goes to mongodb asynchronously. There we can set data into redis but backend is unable to serves data to application. only option I see is retry, but in case of retry we have to wait for backend operation and if data wont find in mongodb then there is unnessasary wait. Please suggest how to overcome with above scenerio, is there any callback mechanism? Thank you.
@Redisinc Жыл бұрын
From what it sounds like, you need to make sure you wait for both the GET from Redis and the potential GET from MongoDB before returning the result to the frontend. If you find data in Redis you can short-circuit and avoid waiting for MongoDB. If not, you still need to wait to get the data from MongoDB. This would be no different if Redis were not in-use at all.
@davidalexander8786 Жыл бұрын
which UI App is that? the one for redis :)
@Redisinc Жыл бұрын
Will is using RedisInsight. An app that you can download or comes bundled with Redis Stack on Docker: redis.com/redis-enterprise/redis-insight/