// Only default cache can be purged via API
const cache = caches.default;
await cache.put(`https://fake.host/${userId}`, Response.json(userData, {
headers: {
"cache-tag": "user"
// Other headers
}
}));
// Only default cache can be purged via API
const cache = caches.default;
await cache.put(`https://fake.host/${userId}`, Response.json(userData, {
headers: {
"cache-tag": "user"
// Other headers
}
}));