# @aaron_kst/local-cache

> Simple Local Caching system

Latest version **0.0.1** (published 2022-08-30) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @aaron_kst/local-cache
pnpm add @aaron_kst/local-cache
yarn add @aaron_kst/local-cache
bun add @aaron_kst/local-cache
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-08-30 |
| First published | 2022-08-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 38.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aaron Chen @ Khant Si Thu |
| Maintainers | aaron_kst |
| Keywords | Local, Cache, Json, Node |

## Links

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

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.1 (latest) — 2022-08-30

## README

# Local Cache

## Installation

    npm install @aaron_kst/local-cache --save

## Initialization

### Common JS

    const LocalCache = require("@aaron_kst/local-cache");

### Module JS

    import LocalCache from "@aaron_kst/local-cache";

### Setup & Configuration

This will create a "/cache" directory within your project folder. Inside the directory will be a json file named according to your constructor argument.

    const Cache = new LocalCache("Foo");

## Methods

### Set Item

This method is used to save an item into your cache.

    const foo = Cache.setItem("foo", "bar");
    console.log(foo) // true;

### Get Item

This method is used retrieve an item saved into the local cache.

    const foo = Cache.getItem("foo");
    console.log(foo) // bar;

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