Skip to content

Cache API unavailable in workerd causes Hono cache() middleware to crash without documentation #4

@Sithumli

Description

@Sithumli

When using Hono’s cache() middleware in a local workerd runtime, the worker crashes with:

Error: No Cache was configured

This occurs because the Cloudflare Cache API (caches.open()) is not available in workerd. However, this limitation is not clearly documented, making it appear as if the Cache API is misconfigured rather than unsupported.

Since workerd is commonly used for local Cloudflare Workers development, this failure mode is confusing without explicit documentation or warnings.

Request: Please clarify in the documentation that the Cache API is not supported in workerd, or provide guidance on recommended local alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions