Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsnext/deepcache
https://github.com/bsnext/deepcache
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bsnext/deepcache
- Owner: bsnext
- License: mit
- Created: 2023-12-17T14:25:33.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-28T14:40:07.000Z (11 months ago)
- Last Synced: 2023-12-28T15:38:18.711Z (11 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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