# pg-redis-nodejs

> Cached postgres queries using redis

Latest version **1.0.3** (published 2020-11-11) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install pg-redis-nodejs
pnpm add pg-redis-nodejs
yarn add pg-redis-nodejs
bun add pg-redis-nodejs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-11-11 |
| First published | 2020-11-10 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexander Shogenov |
| Maintainers | shaggyrec |
| Keywords | postgres, redis, nodejs |

## Links

- npm: https://www.npmjs.com/package/pg-redis-nodejs
- npm.io page: https://npm.io/package/pg-redis-nodejs

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-11-11
- 1.0.2 — 2020-11-10
- 1.0.1 — 2020-11-10
- 1.0.0 — 2020-11-10

## README

# 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]);

---
_Source: https://npm.io/package/pg-redis-nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
