Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bsnext/deepcache


https://github.com/bsnext/deepcache

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# DeepCache
Classic cache library, but with allowed dump methods.

Very early-stage and unstable.

## Usage:
```ts
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