import { createCache } from"https://esm.town/v/xkonti/cache?v=18"// all the function are exported hereexportconst cache = createCache({
tableName: "my-table-name"
})
The main benefit is that it allows me to create as much cache as I want, and allow me to easily upgrade to a new version by just changing the query param.
Changes in version 18
Added
exists(key): Promise<Boolean>
Checks if the provided key exists (has value) in the cache. If the key is expired, it's considered non-existent.small feedback about the
CACHE_TABLE_NAME
setup steps.I feel like it would a better pattern to initialize your app by creating a val with the following content
The main benefit is that it allows me to create as much cache as I want, and allow me to easily upgrade to a new version by just changing the query param.