New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

easyCache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easyCache

a lightweight cache library

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

easyCache (with the uppercase C)

a lightweight cache library

Installation

$ npm install easyCache --save

Usage

import { read, write } from 'easyCache'; 
write('key', 'value'); // value
read('key'); // value

Api

  • read(keys: string/array)
    • get value from cache with key(s)
    • keys can be a string with . or an array
    • if keys is undefined, return the whole cache (not recommend)
    • nested support
  • write(keys: string/array, value: any)
    • write value to cache with key(s)
    • keys can be a string with . or an array
    • but cannot be undefined
    • nested support
  • set
    • alias of write
  • clear(key: string)
    • remove the first class value with key
    • if keys is undefined, remove everything
    • do not support nested cahce remove(welcome pr)

About PR

we really need another name as you see, so welcome for advices

Keywords

cache

FAQs

Package last updated on 21 Sep 2016

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