Skip to content

📒 docs: update cache migration guidance#3908

Merged
ReneWerner87 merged 3 commits intomainfrom
codex/2025-11-29-16-52-04
Nov 30, 2025
Merged

📒 docs: update cache migration guidance#3908
ReneWerner87 merged 3 commits intomainfrom
codex/2025-11-29-16-52-04

Conversation

@ReneWerner87
Copy link
Copy Markdown
Member

Summary

  • remove inline cache migration notes from the main Cache section while retaining the behavioral change description
  • add cache migration steps to the migration guide for restoring v2 Cache-Control behavior, expiration defaults, and cache size limits

Testing

  • make audit (fails: govulncheck forbidden when fetching vulnerability index)
  • make generate
  • make betteralign
  • make modernize
  • make format
  • make lint
  • make test (fails: Test_App_BodyLimit_Zero timeout; see log)

Codex Task

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 29, 2025

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Docs updated to document cache middleware default/behavior changes (Cache-Control emission, Expiration 5m, MaxBytes 1 MiB, Age header, key redaction), CORS config types changed to string slices, and public API signature changes for Router.Add and Test.

Changes

Cohort / File(s) Summary
Documentation
docs/whats_new.md
Expanded v2→v3 migration notes: cache middleware defaults and behavior (DisableCacheControl, DisableValueRedaction, Expiration default 5m, MaxBytes 1 MiB, avoid caching non-cacheable statuses, RFC Age header, Storage/KeyGenerator rename), CORS config slice types, and Router.Add/Test signature updates.
Cache middleware & config
middleware/cache/..., middleware/cache/config.go, .../cache/*.go
Public API/config changes: removed Store/Key fields → added Storage/KeyGenerator; new flags DisableCacheControl, DisableValueRedaction; Expiration default changed to 5m; added MaxBytes default 1 MiB; cache avoids non-cacheable statuses and adds RFC Age header; logs redact keys by default.
CORS config types
middleware/cors/..., cors/config.go
Config fields AllowOrigins, AllowMethods, AllowHeaders, ExposeHeaders changed from comma-delimited strings to []string slices (public API type changes).
Router & Test API
router/router.go, app_test.go, fiber.go, .../router/*.go
Method signature changes: Router.Add(methods []string, path string, handler any, handlers ...any) Router; Test(req *http.Request, config ...fiber.TestConfig) signature updated (public API changes).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Mixed docs and public API/type changes across middleware, router, and test APIs.
  • Areas needing attention:
    • Cache config renames (StoreStorage, KeyKeyGenerator) and default behavior differences.
    • CORS config type changes requiring call-site updates.
    • Router.Add and Test signature changes and any impacted call sites or examples.

Possibly related PRs

Suggested labels

🧹 Updates

Suggested reviewers

  • gaby
  • sixcolors
  • efectn

Poem

🐇 I hopped through changelogs, nibbling bits of code,
Cache rules set to five minutes on the road,
CORS now lists its origins in a row,
Routes learned new signatures — watch them go!
🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the main changes (removing inline notes, adding migration steps) and includes testing details, but lacks most required template sections like Changes Introduced checkboxes, Type of Change, and detailed Checklist completion. Complete the PR description by filling in the template sections: mark relevant 'Changes introduced' checkboxes (Documentation Update is clearly applicable), select 'Type of change', and confirm checklist items, especially documentation updates and testing.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating documentation for cache migration guidance, which aligns with the PR's purpose of reorganizing and enhancing cache migration documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10ff92c and ba7e23a.

📒 Files selected for processing (1)
  • docs/whats_new.md (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ReneWerner87, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the project's documentation by reorganizing and enhancing the guidance for cache middleware. It ensures that users have clear instructions for migrating to new cache behaviors and understanding the updated defaults, improving the overall clarity and usability of the documentation.

Highlights

  • Documentation Update: Migration guidance for cache-related changes has been updated and restructured within the documentation.
  • Cache Migration Notes Relocation: Inline cache migration notes have been removed from the main 'Cache' section and moved to the dedicated migration guide.
  • V2 Cache Behavior Restoration: Detailed steps have been added to the migration guide explaining how to restore v2 Cache-Control behavior, expiration defaults, and cache size limits.
  • New Cache Defaults Noted: The documentation now explicitly mentions the new default behaviors for the cache middleware, including automatic Cache-Control headers, increased default Expiration to 5 minutes, and a new MaxBytes limit of 1 MB.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation to reflect changes in the cache middleware, specifically moving migration details to the migration guide. The changes are accurate and well-structured. I've suggested a minor wording improvement in the migration guide for better clarity and consistency.

Comment thread docs/whats_new.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes cache migration documentation by moving inline behavioral change notes from the main Cache section to the migration guide, while adding comprehensive step-by-step instructions for restoring v2 behavior.

  • Adds a concise behavioral change description to the Cache section (lines 1239-1240) summarizing the new defaults for Cache-Control headers, Expiration, and MaxBytes
  • Expands the migration guide's Cache section (lines 2314-2320) with specific instructions to restore v2 behavior for each changed default

Comment thread docs/whats_new.md Outdated
ReneWerner87 and others added 2 commits November 30, 2025 11:30
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ReneWerner87 ReneWerner87 merged commit 51b0fb2 into main Nov 30, 2025
3 checks passed
@ReneWerner87 ReneWerner87 deleted the codex/2025-11-29-16-52-04 branch November 30, 2025 10:30
@github-project-automation github-project-automation Bot moved this to Done in v3 Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants