Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 | 4x 4x 4x 4x | import redisClient from "../configuration/redisClient.js";
export default async function updateRedisCache(key, updateFunction, options) {
const currentData = await redisClient.get(key);
const updatedData = updateFunction(JSON.parse(currentData));
return await redisClient.set(key, JSON.stringify(updatedData), options)
.then(() => true)
.catch(() => false)
}
|