Sid | R2
08/29/2023, 8:16 PMmojmir
08/30/2023, 10:36 AMmojmir
01/04/2024, 9:04 AMfetch
). Is this normal?Sid | R2
01/07/2024, 4:54 PMmojmir
01/08/2024, 10:56 AMconst cacheKey = new Request(url, request)
const cache = caches.default
// Check whether the value is already available in the cache
// if not, fetch it from R2
response = await cache.match(cacheKey)
if (!response) {
...
ctx.waitUntil(cache.put(cacheKey, response.clone()))
}
We don't have any special cache rules. Our cache rate for subrequests (to R2) was very high but plummeted after switching to Cache API. Is it possible that subrequest caching is somewhat "smarter" and hence results in a higher cache rate?
It looks like R2 native bindings don't have any extra benefits over simply making additional requests to R2 (except for getting rid of occasional 502s from R2).Sid | R2
01/09/2024, 8:56 PM