Memory cache client with the same interface as @ik/smart-cache-manager.
npm install @i1k/memory-cache-client

Memory cache client with the same interface as @i1k/smart-cache-manager.
Uses lru-cache under the hood.
``bashusing pnpm
pnpm i @i1k/memory-cache-client
Usage
`typescript
import MemoryCacheClient from '@i1k/memory-cache-client'// supports all lru-cache options
const cacheClient = new MemoryCacheClient({ max: 10 })
cacheClient.set('key', 'value')
`API Reference
`typescript
interface ICacheClient {
set: (key: string, value: string) => Promise<'OK'>
get: (key: string) => Promise
del: (key: StringOrGlobPattern | StringOrGlobPattern[]) => Promise
clear: () => Promise
keys: (pattern: StringOrGlobPattern | StringOrGlobPattern[]) => Promise
}
`$3
To set a key-value pair.
`typescript
cacheClient.set('foo', 'bar')
// => Promise<'OK'>cacheClient.set('foo/main', 'bar')
// => Promise<'OK'>
`$3
To get a value by key.
`typescript
cacheClient.get('foo')
// => Promise<'bar'>cacheClient.get('bar')
// => Promise
`$3
To delete a key-value pair by a specific key or a glob pattern.
`typescript
cacheClient.del('foo')
// => Promise<['foo']>cacheClient.del('foo*')
// => Promise<['foo', 'foo/main']>
cacheClient.del(['foo', 'foo/*'])
// => Promise<['foo', 'foo/main']>
`$3
To clear the store.
`typescript
cacheClient.clear()
// => Promise<['foo', 'foo/main']>
`$3
To get keys by a specific key or a glob pattern.
`typescript
cacheClient.keys('foo')
// => Promise<['foo']>cacheClient.keys('foo*')
// => Promise<['foo', 'foo/main']>
cacheClient.keys(['foo', 'foo/*'])
// => Promise<['foo', 'foo/main']>
``