Installation
Node.js
npm install incache --save
Example
const store = require('incache');
store.set('my key', 'my value');
store.set('my key', {a: 1, b: 2});
store.remove('my key');
store.clear();
incache.set('my string', 'hello world', {life: 2});
Events
incache.onRemoved(key => {
console.log(key);
});
incache.onCreated((key, record) => {
console.log(key, record);
});
incache.onUpdated((key, record) => {
console.log(key, record);
});
API Documentation
See here
Browser
Local
<script src="node_modules/incache/dist/incache.min.js"></script>
CDN unpkg
<script src="https://unpkg.com/incache/dist/incache.min.js"></script>
CDN jsDeliver
<script src="https://cdn.jsdelivr.net/npm/incache/dist/incache.min.js"></script>
Changelog
You can view the changelog here
License
InCache is open-sourced software licensed under the MIT license
Author
Fabio Ricali