pg-redis-nodejs
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

pg-redis

Cache your postgres queries in NodeJs using redis

npm install pg-redis-nodejs

Usage

const PgRedis = require('pg-redis-nodejs');
// or
import PgRedis from 'pg-redis';

const pgRedis = new PgRedis(
    pgConnection,
    redisConnection,
    {
        expired: 3600, // optional
        prefix: 'pg-redis.' // optional
    }
);

const rows = await pgRedis.query('SELECT id FROM user WHERE id = $1', [666]);

Readme

Keywords

Package Sidebar

Install

npm i pg-redis-nodejs

Weekly Downloads

0

Version

1.0.3

License

UNLICENSED

Unpacked Size

22.6 kB

Total Files

12

Last publish

Collaborators

  • shaggyrec