> For the complete documentation index, see [llms.txt](https://stash-it.gitbook.io/stash-it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stash-it.gitbook.io/stash-it/installation.md).

# Installation

```bash
npm install stash-it
```

As stash-it is just a **core module** without any storage predefined, you need to provide an adapter that will enable you to store your data in a persistence of your choosing. For this example let's use the simplest one: **stash-it-adapter-memory**.

```bash
npm install stash-it-adapter-memory
```

{% hint style="info" %}
If you want to use a different adapter, head off to [available adapters](/stash-it/adapters/available-adapters.md) page.
{% endhint %}

Now, let's combine and use them:

```javascript
import { createCache } from 'stash-it';
import createMemoryAdapter from 'stash-it-adapter-memory';

const adapter = createMemoryAdapter();
const cache = createCache(adapter);

cache.setItem('key', 'some very often fetched value I need to store');
cache.hasItem('key'); // true

const item = cache.getItem('key');

console.log(item.value); // some very often fetched value I need to store

cache.removeItem('key'); // true
cache.hasItem('key'); // false
```
