Answers for "clear all data in redis"

2

clear redis cache

redis-cli flushall
Posted by: Guest on July-31-2021
0

redis flushall

const redis = require('redis')
const redisURL = 'redis://${IP ADDRESS}'
let redisClient = redis.createClient(redisURL)
const util = require('util') //standard library contains "promisify" 

redisClient.hget = util.promisify(redisClient.hget); //returns a promise instead of callback

//DELETE ALL DATA FROM REDIS DB 
redisClient.FLUSHALL()
Posted by: Guest on June-06-2021

Browse Popular Code Answers by Language