So these are the cache layers I assume you have (correct me here if I'm wrong): 1. Browser cache, th

So these are the cache layers I assume you have (correct me here if I'm wrong):
  1. Browser cache, this is local on the user's web browser and based on
    max-age
    . This is quite tricky to bust and you usually disable this for APIs in favor of 2.
  2. Server-side cache, this is the Cloudflare CDN and/or your server and/or the Worker that is serving the API requests. To purge this you need control of the Worker, or if it's the CDN cache you need to make an API call to the Cloudflare API. This is also based on
    maxage
    , but if you want to only cache on the server-side you can use
    s-maxage
    instead.
  3. Hyperdrive query cache. I don't know many details on this, @AJR would know more about how cache busting works here.
Was this page helpful?