# cachier-js

> A node package for interacting with a self-hosted cachier service

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

## Install

```sh
npm install cachier-js
pnpm add cachier-js
yarn add cachier-js
bun add cachier-js
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-07-12 |
| First published | 2022-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | apinanyogaratnam |
| Maintainers | apinanyogaratnam |

## Links

- npm: https://www.npmjs.com/package/cachier-js
- Repository: https://github.com/apinanyogaratnam/cachier-js
- Homepage: https://github.com/apinanyogaratnam/cachier-js#readme
- Issues: https://github.com/apinanyogaratnam/cachier-js/issues
- npm.io page: https://npm.io/package/cachier-js

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [cachier-js](https://npm.io/package/cachier-js.md) ^1.0.1

## Recent versions

- 1.0.1 (latest) — 2022-07-12
- 1.0.0 — 2022-07-10
- 0.0.5 — 2022-07-10
- 0.0.4 — 2022-07-10
- 0.0.3 — 2022-07-10
- 0.0.2 — 2022-07-10
- 0.0.1 — 2022-07-10

## README

# Cachier JS

A javascript library for interacting with a self-hosted cachier service.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Support](#support)
- [Contributing](#contributing)

## Installation

Install package with npm:

```sh
npm install cachier-js
```

Install package with yarn:

```sh
yarn add cachier-js
```

Install package with pnpm:

```sh
pnpm add cachier-js
```

You can even use multiple registries:
url: https://www.npmjs.com/package/cachier-js
url: https://github.com/apinanyogaratnam/cachier-js/packages/1529765

## Usage

```js
import Cachier from 'cachier-js';

const client = new Cachier('http://localhost:8000');

const setCache = async (key, value, expiry) => {
    const response = await client.set(key, value, expiry);
    console.log(response);
}

const getCache = async (key) => {
    const response = await client.get(key);
    console.log(response);
}

setCache('key', 'value', 1000).then(() => {
    getCache('key');
});
```

## Support

Please [open an issue](https://github.com/apinanyogaratnam/cachier-js/issues/new) for support.

## Contributing

Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/apinanyogaratnam/cachier-js/compare/).

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