Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 806 Bytes

README.md

File metadata and controls

34 lines (29 loc) · 806 Bytes

DeepCache

Classic cache library, but with allowed dump methods.
Very early-stage and unstable.

Usage:

new DeepCache(options = {})

Options:

  • ttl - Default keys time-to-live in seconds (Default: 60)

  • ttc - Default time for collect expired keys in seconds (Default: 60)

  • separator - Separator for split keys to levels

    Example: "users:id", for use DeepCache.values("users:*")

  • separator - Separator for split keys to levels

  • cloning - Use "structoredClone" for cache records (Default: false)

  • events - Enable emitting events (Default: false)

API:

  • DeepCache.set()
  • DeepCache.get()
  • DeepCache.has()
  • DeepCache.del()
  • DeepCache.values()
  • DeepCache.saveDump()
  • DeepCache.loadDump()
  • DeepCache.clean()
  • DeepCache.on();

Events:

  • set
  • del
  • expired