const homeController = async () => {
const res = await fetch('example.com', {
method: 'GET',
cf: {
cacheEverything: true,
cacheTtlByStatus: {
'100-199': 0,
'200-299': 14400,
'300-599': 0,
},
},
headers: {
'Cache-Control': 'public, max-age=14400',
},
});
const data = await res.json();
return data;
};
const homeController = async () => {
const res = await fetch('example.com', {
method: 'GET',
cf: {
cacheEverything: true,
cacheTtlByStatus: {
'100-199': 0,
'200-299': 14400,
'300-599': 0,
},
},
headers: {
'Cache-Control': 'public, max-age=14400',
},
});
const data = await res.json();
return data;
};