JacobLinCool / JacobLinCool/workerd-docker

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

Open Beginner friendly
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
34
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository documentation for guidance on Hono's cache() middleware, the workerd runtime, and the caches.open() failure. Confirm how local workerd behaves, then document that the Cache API is unsupported and include any recommended local alternatives; the issue is done when this limitation and guidance are clear.

Written by the indexing model from the issue text.

Assessment

Domain
cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.