I was testing a request like this in the playground:
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Fetch and log a request
* @param {Request} request
*/
async function handleRequest(request) {
console.log('Got request', request)
const response = await fetch("https://mywebsite.com", { cf: { cacheTtl: 3000 } })
console.log('Got response', response)
return response
}
However when looking at server logs for my website, I saw that the server was still being hit on subsequent requests.
Does cacheTtl work in the playground?
Is there documentation that shows what doesn’t work in the playground?
Thanks!