node-redis Questions

2

Solved

I am trying to understand how Redis AOF file works and maybe write a parser given some simple Redis AOF file. Right now I generated an AOF file by doing these commands in Redis: SET firstkey first...
Dorking asked 24/3, 2019 at 18:39

3

Solved

The following code save the whole array as single value in redis list. But I want to save array values individually. How can I do it? P.S So sorry for poor English. var redis = require('redis'),...
Ranjiv asked 2/11, 2013 at 18:21

6

Solved

First, let me tell you how I'm using Redis connection in my NodeJS application: I'm re-using one connection throughout the app using a singleton class. class RDB { static async getClient() { i...
Platy asked 22/3, 2022 at 15:34

9

Solved

I am developing an application where chats has to cached and monitored, currently it is an local application where i have installed redis and redis-cli. The problem i'm facing is (node:5368) Unhand...
Comprehensive asked 1/12, 2021 at 13:52

5

Solved

const redis = require('redis'); require('dotenv').config(); console.log(process.env.redisHost, ':', process.env.redisPort); const redisClient = redis.createClient({ host: process.env.redisHost, p...
Bjork asked 8/12, 2021 at 11:36

4

Solved

node-redis has fantastic functionality for handling any Redis disconnections once everything is up and running. If the Redis instance becomes unavailable, use of an appropriate retry_strategy means...
Hesione asked 23/8, 2017 at 10:13

5

Solved

I am building a nodejs app that connects to redis. I have this working with my local instance of redis. Now, I am using ioredis to connect from my nodejs app to my redis cluster in k8s in AWS. Here...
Sweetbread asked 15/10, 2020 at 14:43

4

Solved

I have an array of Objects that I want to store in Redis. I can break up the array part and store them as objects but I am not getting how I can get somethings like {0} : {"foo" :"bar", "qux" : "...
Dogs asked 3/8, 2016 at 15:6

4

Solved

I have a strange redis behavior: const redis = require('redis'); const { REDIS_URL: redisUrl, REDIS_PASSWORD: redisPassword } = process.env; const client = redis.createClient(redisUrl, { no_ready...
Father asked 14/8, 2017 at 10:31

13

Solved

const express = require("express"); const redis = require("redis"); const app = express(); const client = redis.createClient({ url: "redis://[email protected]",...
Casanova asked 28/11, 2021 at 17:23

7

I am trying to save a binary object in redis and then serve it back as an image. Here is the code I am using to save the data: var buff=new Buffer(data.data,'base64'); client.set(key,new Buffer(d...
Windy asked 22/12, 2013 at 17:57

4

I was trying to connect Redis (v4.0.1) to my express server with typescript but having a bit issue. Am learning typescript. It's showing redlines on host inside redis.createClient() Can anyone help...
Berkin asked 21/1, 2022 at 18:22

7

Solved

Is there any way to remove/delete an entry by key, using Node_redis? I can't see any such option from the docs..
Sf asked 5/3, 2013 at 8:59

4

Solved

I'm trying to run an integration test with redis and jest. It always throws the "Jest has detected the following 1 open handle potentially keeping Jest from exiting:" error when running with --det...
Gokey asked 23/10, 2018 at 0:46

2

Solved

I have an array which I fill up in a for like this: var obj = []; for(i = 0; i < data.bids.length; i += 1) { obj.push(JSON.parse(data.bids[i][0])); } After that I verify if the array contain...
Coryphaeus asked 8/5, 2018 at 5:33

2

Solved

I am using Node Redis with this config: import redis from "redis"; import { promisify } from "util"; import config from "../../appConfig"; const redisUrl = config.RED...
Rothrock asked 31/3, 2021 at 18:4

4

Solved

I am using NodeJS + Express + Redis on RedisOnGo + node_redis as a client. I expect a lot of concurrency, so trying to test WATCH. This example won't contain Express, just necessary stuff. var red...
Relegate asked 3/4, 2013 at 0:38

7

Is it possible to SET redis keys without removing their existing ttl? The only way I know of at the present time is to find out the ttl and do a SETEX but that seems less accurate.
Viosterol asked 20/2, 2014 at 3:13

2

I am creating a multi-node Express/Socket.io server using Typescript and I am trying to import RedisClient from redis, but I can't get it to work because I get the error Module '"redis"'...
Duplex asked 6/12, 2021 at 20:17

3

Solved

I used to do client.setex(key, 900, value) for storing single key-value. But, I want to store an object with expiration time. I come up with function hmset, but I don't know how to make expiration ...
Mamiemamma asked 26/12, 2018 at 11:0

2

Solved

After using Node.js and socket.io for a while, I understand that if I want my application to support up to 1 million concurrent users I need to scale it, So I started using Redis to PUB/SUB message...
Svetlanasvoboda asked 20/8, 2012 at 22:13

1

Solved

I am currently using cache manager module from NestJS and I was wondering why I can't get the NodeRedis client like this : constructor( @Inject(CACHE_MANAGER) private cacheManager: Cache, ) { c...
Pyrogen asked 24/6, 2021 at 14:41

1

Solved

I'm using redis with nodejs. Version: "redis": "^3.1.2" When my server connects to redis, I get the following error: ERR wrong number of arguments for 'auth' command I'm guessi...
Conall asked 20/5, 2021 at 3:16

2

On github I don't see an option for read timeout, https://github.com/NodeRedis/node_redis There's connect_timeout, but that's for making the connection, not about reading/writing tho.
Mixer asked 3/9, 2015 at 17:54

0

Let me preface the question by saying that I understand that there will probably not be a definitive, yes-or-no answer on this topic and that answers given might be opinion driven. However, I do re...
Buchholz asked 17/1, 2021 at 11:43

© 2022 - 2024 — McMap. All rights reserved.