fix: disable homepage caching in local development environment #12335
fix: disable homepage caching in local development environment #12335RayBB merged 1 commit intointernetarchive:masterfrom
Conversation
|
Thank you for this contribution, @KrishnaShuk! 🤖 Copilot has been assigned for an initial review. @RayBB is assigned to this PR and currently has:
PR triage checklist (maintainers / Pam)
Note This comment was automatically generated by Pam, Open Library's Project AI Manager, on behalf of @mekarpeles. Pam is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting. |
There was a problem hiding this comment.
Pull request overview
Disables homepage memcache caching in local development ("dev" feature flag) so homepage template/content changes show up immediately on refresh, while keeping the existing 5-minute caching behavior for non-dev environments.
Changes:
- In
home.GET(), bypassesget_cached_homepage()when"dev" in web.ctx.featuresand callsget_homepage()directly. - Keeps the existing cached homepage path unchanged for non-dev environments.
RayBB
left a comment
There was a problem hiding this comment.
Very good job on this one! Good eye catching that we need to specify dev mode and you used modern python syntax 👍
Closes #12324
Fix
Disables the 5-minute homepage Memcache in local dev environments so template changes reflect instantly upon refresh.
Technical
Conditionally bypasses get_cached_homepage() in home.py when the
"dev"feature flag is detected.Testing
Screenshot
N/A
Stakeholders
@RayBB