# @awey/dache

> Use memory,session storagy or local storage to cache things

Latest version **1.0.6** (published 2022-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @awey/dache
pnpm add @awey/dache
yarn add @awey/dache
bun add @awey/dache
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-12-07 |
| First published | 2022-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Awey |
| Maintainers | awey |

## Links

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

## Recent versions

- 1.0.6 (latest) — 2022-12-07
- 1.0.5 — 2022-12-06
- 1.0.4 — 2022-11-25
- 1.0.2 — 2022-08-31
- 1.0.1 — 2022-08-31
- 1.0.0 — 2022-08-31

## README

# Dache

Use memory,session storagy or local storage to cache things.

## Install

```sh
# NPM
npm install @awey/dache --save

# Yarn
yarn add @awey/dache
```

## Useage

```ts
import Dache from '@awey/dache'

const dache = new Dache('local', 'myDache')
dache.set('username', 'Tom')

console.log(dache.get('username'))
```

## API

* `new Dache(type: 'memory' | 'session' | 'local', name: string) => Dache`: init a Dache instance
* `dache.get(key: string) => any`: retrieve a value by key from cache
* `dache.set(key: string, value: any) => void`: store a value by key to cache
* `dache.remove(key: string) => void`: delete a value by key from cache
* `dache.clear() => void`: clear all values in cache
* `dache.has(key: string)`: determines whether a key exists(not null)
* `dache.is(key: string, value: any)`: determines whether a value is equal(===) to the specified value

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