© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3y ago•
4 replies
Arthur

Workers fetch cache not working?

I'm using an external api, which is rate limited. But I need more requests than that the limit allows, therefore I want to use cloudflare workers to cache the request and work as a middle man. I'm using the
hono
hono
framework to handle my requests (but I don't think that should affect this issue). I'm using this function to cache my requests.
export const cachedFetch = async (url: string, time = 60 * 60) =>
  await fetch(url, {
    cf: {
      cacheTtl: time,
      cacheEverything: true,
      cacheKey: url,
    },
  });
export const cachedFetch = async (url: string, time = 60 * 60) =>
  await fetch(url, {
    cf: {
      cacheTtl: time,
      cacheEverything: true,
      cacheKey: url,
    },
  });

But when runnin this, I'm still getting rate-limited by the external api? Even tough 1 hour is plenty below the rate limit?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

PNPM cache not working on Workers build
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
9mo ago
How to cache fetch result in workers ?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Workers "Build Cache" not working in monorepos + pnpm
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
5mo ago