> 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/master.md).

# stash-it

## What is stash-it?

It is a caching mechanism based on plugins.\
It's core concept is to stay simple, small and easily extendable using plugins.

#### **Plugins allow you to:**

* write handlers for hook'able methods
* extend API of cache object

**stash-it** can be used in various environments (client, server or native), depending on what adapter you use.

It's written in **ES6**, so if you want to use it in an environment that does not understands it, you need to compile it to older ES version (e.g. by using [Babel](https://babeljs.io/)).

It's also [very small](https://bundlephobia.com/result?p=stash-it) - 1.6kB minified and gzipped.

## Why stash-it?

At one time, I was looking for a cache mechanism for node, that would allow me to add tags to stored items. I found some solutions. But when I dug deeper and began to find various modules that were either too big, had too few / many methods, were hard to use or were not maintained for a very long time.

Then I thought - if there isn't anything close to what I am looking for, why not create something of my own.

That's how **stash-it** came to be.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://stash-it.gitbook.io/stash-it/master.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
