/Knowledge/sources/honojs__hono/llms-full/cache-middleware-options-cacheablestatuscodes-number--f89ca7750d88.md
Cache Middleware: Options > cacheableStatusCodes: number[] - hono-docs
Cache Middleware: Options cacheableStatusCodes: number[] Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.t...
Cache Middleware: Options > cacheableStatusCodes: number[]
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#cacheablestatuscodes-number
Summary
An array of status codes that should be cached. The default is [200]. Use this option to cache responses with specific status codes. ```ts app.get( '*', cache({ cacheName: 'my-app', cacheControl: 'max-age=3600', cacheableStatusCodes: [...
Content
An array of status codes that should be cached. The default is [200]. Use this option to cache responses with specific status codes.
app.get(
'*',
cache({
cacheName: 'my-app',
cacheControl: 'max-age=3600',
cacheableStatusCodes: [200, 404, 412],
})
)
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#cacheablestatuscodes-number",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Cache Middleware > Options > cacheableStatusCodes: `number[]`",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 283,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Cache Middleware: Options > cacheableStatusCodes: number[]",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}