Repository navigation
[KV] Clarify cacheTtl default and that KV reads are always cached - #35513
Open
chris-martinelli wants to merge 1 commit into
Open
chris-martinelli wants to merge 1 commit into
chris-martinelli wants to merge 1 commit into
Conversation
State the 60-second default in the get()/getWithMetadata() parameter reference, explain that omitting cacheTtl still caches reads, and reword the guidance so it is clear a *long* cacheTtl is what is discouraged for frequently updated data.
chris-martinelli
requested review from
a team,
irvinebroque,
rts-rob,
thomasgauvin and
vy-ton
as code owners
November 20, 2026 22:15
Contributor
AI Review✅ Reviewed 👉 Fix in your agent 👈Fix the following review findings in PR #35513 (https://github.com/cloudflare/cloudflare-docs/pull/35513).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit because the next review reads PR comments.
## Style Guide
- S-185d7c06 | src/content/docs/kv/api/read-key-value-pairs.mdx:320 | Two-item bullet list in `CacheTtl parameter` section
The new guidance is a bulleted list with only two items (`Increase cacheTtl` / `Decrease cacheTtl`), which the style guide says to consider writing as prose.Style Guide
Commands
|
Contributor
Review coverage🟡 1 ownership area needs approval. Suggested reviewers: @irvinebroque @rts-rob @vy-ton
CODEOWNERS mappings for displayed areas (1)
|
Contributor
|
Worker Preview URL: https://gh-kv-cachettl-default-clarification.previews.developers.cloudflare.com Files with changes (up to 15)
|
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://kv-cachettl-default-clarification.previews.developers.cloudflare.com (commit cc5db1b)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Read key-value pairs page reads as contradictory about
cacheTtl:cacheTtlas optional with a minimum of 30 but no default.cacheTtlis not recommended if your data is updated often", which suggests leaving it out avoids caching.60is the default".In fact every KV read is cached, and leaving out
cacheTtlmeans a 60-second cache (confirmed in the Jan 30, 2026 changelog: "The default cache TTL remains unchanged at 60 seconds"). This PR makes that explicit.Changes (
src/content/docs/kv/api/read-key-value-pairs.mdx)get/getWithMetadatasignatures):(minimum: 30)→(default: 60, minimum: 30).cacheTtl)" → "up to 60 seconds by default (or thecacheTtlyou set)".cacheTtlmeans 60 seconds, and that caching cannot be turned off.cacheTtlis not recommended…" → "A longcacheTtlis not recommended…", plus a pointer to Durable Objects for read-after-write needs.No behaviour claims beyond what the existing docs and changelog already state.