Skip to main content

Cache Plain Local Storage Driver

Introduction#

This driver implements Cache Driver Interface.

The plain local storage driver implements and manipulates data from The Browser Local Storage.

Usage#

The same exact usage is the same Cache Manager except the setDriver and getDriver, these methods are for the cache manager only.

Example of usage outside the cache manager#

import { PlainLocalStorageDriver } from 'mongez/cache';
let driver: PlainLocalStorageDriver = new PlainLocalStorageDriver();
driver.set('name', 'Hasan'); // this will be stored in the local storage.