# flat-file-cache

> Store objects in a flat file as JSON

Latest version **0.0.1** (published 2013-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install flat-file-cache
pnpm add flat-file-cache
yarn add flat-file-cache
bun add flat-file-cache
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2013-08-02 |
| First published | 2013-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | skerit |

## Links

- npm: https://www.npmjs.com/package/flat-file-cache
- npm.io page: https://npm.io/package/flat-file-cache

## Recent versions

- 0.0.1 (latest) — 2013-08-02

## README

# flat-file-cache
Storing objects in a flat file as JSON

## Installing from npm

```shell
$ npm install flat-file-cache
```

## Using it

1. Require the flat-file-cache class

    var Flat = require('flat-file-cache');

2. Create a new cache object. The only parameter is the directory to use

    var cache = new Flat('storage');
		
3. Storing data

    cache.set('keyname', {my: data}, function callback(err) {});

4. Getting data

    cache.get('keyname, function callback(result) {});

5. Sync

There is also a setSync() and getSync() version.

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