( cache: Keyv, key: string, value: Record<string, any> | Record<string, any>[], ttl?: number, )
| 149 | } |
| 150 | |
| 151 | export async function setCacheValue( |
| 152 | cache: Keyv, |
| 153 | key: string, |
| 154 | value: Record<string, any> | Record<string, any>[], |
| 155 | ttl?: number, |
| 156 | ) { |
| 157 | const compressed = await compress(value); |
| 158 | await cache.set(key, compressed, ttl); |
| 159 | } |
| 160 | |
| 161 | export async function getCacheValue(cache: Keyv, key: string): Promise<any> { |
| 162 | const value = await cache.get(key); |
no test coverage detected