Skip to content

Proposal: Add default cache-control #22

Open
@transitive-bullshit

Description

@transitive-bullshit

cache.put(request, response) uses the response's cache-control header to determine the object's TTL (and other standard headers).

Currently, we're passing responses with no cache-control which isn't really well-specified by Cloudflare as to what this actually means.

Experimentally, it appears that CF caches these objects for ~10 seconds, but we should really override this with a default value.

Note that for Notion2Site, I'm passing pragma: no-cache to disable caching within the worker because Vercel's SWR edge caching is all that's needed. Any additional caching of the page data just introduces additional lag before updates are reflected to their edge cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions