You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@valo/cache

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@valo/cache

Cache implementation using IndexedDB

0.0.1
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Valo Caching Solution

Cache solution which makes use of IndexedDB storage in the browser to avoid reaching the size limits of localStorage and sessionStorage.

Installation

npm i @valo/cache

Usage in your solution

In your solution, you can use it as follows:

import { CacheService, DateHelper, DateInterval } from '@valo/cache';

const cache = new CacheService(`EventCache`);
await cache.init();

// Write data to the cache
await cache.put(`YourCacheKey`, <data>, DateHelper.dateAdd(Date(), DateInterval.minute, 1));

// Read data from the cache
const eventData = await cache.get(`YourCacheKey`);

Changelog

Check it out here: changelog

Feedback

If you have feedback or issues, feel free to report them on the issue list of this project: https://github.com/ValoIntranet/indexeddb-cache.

Keywords

Caching

FAQs

Package last updated on 16 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts