# encrypt-async-cache

> async-encrypted-disk-cache

Latest version **1.0.5** (published 2019-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install encrypt-async-cache
pnpm add encrypt-async-cache
yarn add encrypt-async-cache
bun add encrypt-async-cache
```

## 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.5 |
| Published | 2019-04-19 |
| First published | 2019-04-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 244.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lg |
| Maintainers | lukegarrigan |

## Links

- npm: https://www.npmjs.com/package/encrypt-async-cache
- npm.io page: https://npm.io/package/encrypt-async-cache

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ~2.6.9
- [cryptr](https://npm.io/package/cryptr.md) ^4.0.2
- [typescript](https://npm.io/package/typescript.md) ^3.4.1

## Recent versions

- 1.0.5 (latest) — 2019-04-19
- 1.0.4 — 2019-04-19
- 1.0.3 — 2019-04-19
- 1.0.2 — 2019-04-19
- 1.0.1 — 2019-04-19
- 1.0.0 — 2019-04-19

## README

<h1 align="center">
  <br>
  <br>
  async-encrypted-disk-cache
  <br>
</h1>

<h4 align="center">An encrypted async disk caching module</h4>

<p align="center">
  <a href="https://travis-ci.com/LukeGarrigan/async-encrypted-disk-cache.svg?branch=master">
      <img src="https://travis-ci.com/LukeGarrigan/async-encrypted-disk-cache.svg?branch=master">
  </a>
  
  <a href='https://coveralls.io/github/LukeGarrigan/async-encrypted-disk-cache?branch=master'>
      <img src='https://coveralls.io/repos/github/LukeGarrigan/async-encrypted-disk-cache/badge.svg?branch=master' alt='Coverage Status'>
  </a>
</p>

## Install

```bash
$ npm install encrypt-async-cache
```

## Usage

```js
const FileSystemCache = require("encrypt-async-cache").FileSystemCache;
```

## Example

```js const FileSystemCache = require("encrypt-async-cache").FileSystemCache;


const myCache = new FileSystemCache("my-cache", "my-secret-key");

myCache.set("firstCache", "This is the data").then(success => {
  success === true;
  // item is put into cache
});


myCache.get("firstCache").then(cachedItem => {
  cachedItem === "This is the data";
  // item is retrieved from the cache
});


myCache.remove("firstCache").then(hasRemoved => {
  hasRemoved === true;
  // item is removed from the cache directory
});

myCache.clear().then(hasCleared => {
  hasCleared === true;
  // your cache directory has been cleared
});
```

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