Buckets:
| // @ts-check | |
| const { requestIdStorage } = require('./als') | |
| const defaultCacheHandler = | |
| require('next/dist/server/lib/cache-handlers/default.external').default | |
| /** | |
| * @type {import('next/dist/server/lib/cache-handlers/types').CacheHandler} | |
| */ | |
| const cacheHandler = { | |
| async get(cacheKey) { | |
| return defaultCacheHandler.get(cacheKey) | |
| }, | |
| async set(cacheKey, pendingEntry) { | |
| const requestId = requestIdStorage.getStore() | |
| console.log('set cache', cacheKey, 'requestId:', requestId) | |
| return defaultCacheHandler.set(cacheKey, pendingEntry) | |
| }, | |
| async refreshTags() { | |
| return defaultCacheHandler.refreshTags() | |
| }, | |
| async getExpiration(tags) { | |
| return defaultCacheHandler.getExpiration(tags) | |
| }, | |
| async updateTags(tags) { | |
| return defaultCacheHandler.updateTags(tags) | |
| }, | |
| } | |
| module.exports = cacheHandler | |
Xet Storage Details
- Size:
- 838 Bytes
- Xet hash:
- 667f64b27bb312869e8d934a43d7f5f522663bc5e412ae3533f7f678ead9ab95
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.