seyfert/packages/cache/README.md
2022-09-13 12:09:09 +08:00

1.1 KiB

@biscuitland/cache

Most importantly, biscuit's cache is:

A resource control cache layer, based on carriers and resource-intensive policies

biscuit

Install (for node18)

npm install @biscuitland/cache

Example (Basic)

import { Cache, MemoryCacheAdapter } from '@biscuitland/cache';

const bootstrap = async () => {
	const cache = new Cache({
		adapter: new MemoryCacheAdapter(),
	});

    // You can listen to the raw biscuit event

    cache.start(<payloads>);
};

bootstrap();