question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

have shared data for different client with same connection parameters

See original GitHub issue

If creating 2 Redis clients with same connection parameters, I would like to have shared data between them

const Redis = require('ioredis-mock');
const client1 = new Redis('localhost', 6378);
const client2 = new Redis('localhost', 6378);
await client1.hset('testing', 'test', '2');
const val = await client2.hget('testing', 'test');
console.log(val) // should output 2

As I see it, it can be implemented by mapping connection string to a DB object

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Parcleycommented, Jan 10, 2019

how about a feature like this:

const Redis = require('ioredis-mock');
const client1 = new Redis();
const client2 = client1.createConnectedClient();
await client1.hset('testing', 'test', '2');
const val = await client2.hget('testing', 'test');
console.log(val) // should output 2
1reaction
insanehongcommented, Nov 22, 2018

good issue

I will request PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Server Reporting Services (SSRS) Shared Dataset
In the SQL Server Reporting Service (SSRS) report development process; we can use a beneficial feature which is called the “shared dataset”.
Read more >
Ways to share an Access desktop database - Microsoft Support
Some limitations include reliability and availability if there are multiple simultaneous users changing data since all database objects are shared.
Read more >
Should I share types between a Web API service and its client ...
In both options, you are effectively sharing types between the client and the server.
Read more >
How to share a SINGLE report with ALL your clients
First, let's talk about the available ways of sharing. To deliver a solution to your client, you have two options:.
Read more >
15: 20.11. Client Connection Defaults - PostgreSQL
The default value for this parameter is "$user", public . This setting supports shared use of a database (where no users have private...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found