()
| 20 | globalThis.APQ_TTL = '900' |
| 21 | |
| 22 | export const mockCache = () => { |
| 23 | const store = new Map() |
| 24 | const cache = { |
| 25 | // @ts-ignore |
| 26 | match(req) { |
| 27 | return store.get(req.url) |
| 28 | }, |
| 29 | // @ts-ignore |
| 30 | put(req, res) { |
| 31 | store.set(req.url, res) |
| 32 | }, |
| 33 | clear() { |
| 34 | store.clear() |
| 35 | }, |
| 36 | get store() { |
| 37 | return store |
| 38 | }, |
| 39 | } |
| 40 | return cache |
| 41 | } |
| 42 | |
| 43 | // @ts-ignore |
| 44 | // worktop/cache |