Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Cache Guide

fengmk2 edited this page Jan 19, 2021 · 1 revision

cnpmjs.org support custom cache, but all the cache need follow the rules:

Protocols

  • async function set(key, value, options)

    • key: cache store key string
    • value: cache value string
    • options
      • expire: expire time in seconds
  • async function get(key)

    • key: cache store key string
  • async function remove(key)

    • key: cache store key string

All function are async function.