# @helperdiscord/cache

> This is a caching library for discord based on the pg-native library.

Latest version **2.1.5** (published 2021-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install @helperdiscord/cache
pnpm add @helperdiscord/cache
yarn add @helperdiscord/cache
bun add @helperdiscord/cache
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.5 |
| Published | 2021-03-26 |
| First published | 2021-01-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | nytelife26, fakevetlix, tbnritzdoge |

## Links

- npm: https://www.npmjs.com/package/@helperdiscord/cache
- Repository: https://github.com/helperdiscord/cache
- Homepage: https://github.com/helperdiscord/cache#readme
- Issues: https://github.com/helperdiscord/cache/issues
- npm.io page: https://npm.io/package/@helperdiscord/cache

## Dependencies (1)

- [pg-native](https://npm.io/package/pg-native.md) ^3.0.0

## Recent versions

- 2.1.5 (latest) — 2021-03-26
- 2.1.4 — 2021-02-11
- 2.1.3 — 2021-02-11
- 2.1.2 — 2021-02-11
- 2.1.1 — 2021-02-11
- 2.1.0 — 2021-02-11
- 2.0.2 — 2021-02-11
- 2.0.1 — 2021-02-11
- 2.0.0 — 2021-02-11
- 1.1.0 — 2021-02-08
- 1.0.0 — 2021-01-31
- 0.4.1 — 2021-01-30
- 0.4.0 — 2021-01-30
- 0.3.0 — 2021-01-27
- 0.2.2 — 2021-01-27
- … 5 more at https://npm.io/package/@helperdiscord/cache/versions

## README

# @helperdiscord/cache

This is a caching library for discord based on the pg-native library.

```ts
const { Cache } = require('@helperdiscord/cache');
const { REST } = require('@klasa/rest'); // a rest client you can use 

const rest = new REST({ version: 8 });
rest.token = process.env.DISCORD_TOKEN;

const cache = new Cache(process.env.POSTGRES_URI, { cache: true, rest: rest });

const doge = cache.users.get('395782478192836608'); // will return a user object (from cache) or null

const forceDoge = await cache.users.fetch('395782478192836608'); // will return a user object or null

cache.users.del('395782478192836608'); // will remove the user with the id "395782478192836608" from the user cache

```


Note: You need libpq bindings for this to work

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