Skip to content

specifying a cache value we must not use ALWAYS unless its NO CACHE#137

Merged
zendern merged 3 commits intomainfrom
not-always
Mar 23, 2026
Merged

specifying a cache value we must not use ALWAYS unless its NO CACHE#137
zendern merged 3 commits intomainfrom
not-always

Conversation

@zendern
Copy link
Copy Markdown
Contributor

@zendern zendern commented Mar 23, 2026

Why is this change necessary?

We do want always on the NO CACHE scenarios so that it never caches but for this one where we are trying to make sure it caches we dont want it b/c we could end up caching errors when we dont want that behavior. I missed it when it suggested this change. 420e88b

How does this change address the issue?

Removes the always flag on the nuxt static resources

What side effects does this change have?

N/A

How is this change tested?

N/A

Summary by CodeRabbit

  • Chores
    • Adjusted server response header behavior so caching headers are applied more appropriately depending on how assets are served. Static asset responses will now receive caching directives only in the intended response contexts, while proxied responses consistently include caching and related headers to ensure predictable client-side caching behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

Warning

Rate limit exceeded

@zendern has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ef6cefc1-390b-4e1c-8e13-61a49fd7924f

📥 Commits

Reviewing files that changed from the base of the PR and between 8822527 and dbc6b4b.

📒 Files selected for processing (1)
  • template/{% if has_backend %}backend{% endif %}/src/backend_api/app_def.py.jinja
📝 Walkthrough

Walkthrough

Adjusted Nginx add_header directives in the frontend template: removed always for Cache-Control in location /_nuxt/, and added always for Cache-Control, Pragma, and Expires in the location @proxy`` block. No routing or proxy logic changed. (39 words)

Changes

Cohort / File(s) Summary
Nginx template
template/frontend/{% if not deploy_as_executable %}default.conf.template{% endif %}.jinja
In location /_nuxt/ removed always from add_header Cache-Control. In location @proxy`` added always to `add_header Cache-Control`, `add_header Pragma`, and `add_header Expires`. No other behavior modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Better cache control #135: Modifies the same Nginx template blocks (location /_nuxt/ and location @proxy``) affecting Cache-Control/`Pragma`/`Expires` header `always` behavior.

Suggested reviewers

  • ejfine
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: removing the always modifier from cache directives in the Nuxt static resources section, aligning with the principle that always should only be used for NO CACHE scenarios.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description covers all required template sections with clear explanations of the rationale, solution, and testing approach.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@zendern zendern requested a review from ejfine March 23, 2026 18:19
@zendern zendern enabled auto-merge (squash) March 23, 2026 18:23
@ejfine
Copy link
Copy Markdown
Contributor

ejfine commented Mar 23, 2026

@zendern - any concerns about adding HEAD to the list of CORS allowed things in app_def.py to the template?

allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],

If not, can you make that change here real quick

@zendern
Copy link
Copy Markdown
Contributor Author

zendern commented Mar 23, 2026

@zendern - any concerns about adding HEAD to the list of CORS allowed things in app_def.py to the template?

allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],

If not, can you make that change here real quick

No issues and it has been added dbc6b4b

@zendern zendern merged commit 48849dd into main Mar 23, 2026
13 checks passed
@ejfine ejfine deleted the not-always branch March 23, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants