Skip to content
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.