Kids cache implementation
npm install @0k/cacheThis packages holds a cache decorator implementation. It draws its
inspiration on kids.cache a python simple yet powerful cache
decorator.
This implementation leverage decorator in typescript to reach same goals:
* no dependencies
* cache clearing support
Its still in infancy and lacks:
* support for normal function (only methods and properties are cachable)
* cache stats
* 100% coverage
* doc
@0k/cache to your projectFrom the root of your project:
``sh`
npm install --save @0k/cache
Or better, as @0k/cache is still in early release,
`sh`
npm install --save @0k/cache#master
To be sure to get the latest version, relaunch this last command
whenever you want to update.
This package is using npm to track dependendies, so you can install them
with:
`sh`
npm install
As this package is written in typescript. You can transpile tojavascript and transpile on file change with:
`sh`
## Compile and watch
npx tspc -w
Tests are managed through vitest
`sh`
## Run test once
npm run test
Note that you can also use npx vitest` command to launch tests in
watch mode.