(...args: Args)
| 99 | }; |
| 100 | |
| 101 | const update = (...args: Args) => { |
| 102 | const key = buildKey(...args); |
| 103 | |
| 104 | return async (value: T) => { |
| 105 | const cacheManager = await getCacheManager(); |
| 106 | await cacheManager.set(key, JSON.stringify(value)); |
| 107 | |
| 108 | if (memTTL > 0) { |
| 109 | memCache.set(key, { value, expiry: Date.now() + memTTL }); |
| 110 | } |
| 111 | }; |
| 112 | }; |
| 113 | |
| 114 | const del = async (...args: Args) => { |
| 115 | const key = buildKey(...args); |
no test coverage detected