Skip to content

Add Cache-Control header to cache static files for 1 day - #151

Merged
clue merged 1 commit into
clue:mainfrom
clue-labs:cache-control
Sep 20, 2026
Merged

clue merged 1 commit into
clue:mainfrom
clue-labs:cache-control

Conversation

@clue

@clue clue commented Sep 20, 2026

Copy link
Copy Markdown
Owner

This changeset adds a Cache-Control header so all files are cached for 1 day. Previously the origin sent no caching headers at all, so this was left to whatever sits in front of it: Bunny CDN currently answers with anything between 1 day and 30 days depending on the file, so a changed page or script can keep serving stale for up to a month.

The 1 day matches what the CDN has been configured with since #145 and what the README has claimed since #93. Sending it from the origin means it applies consistently, survives a CDN change and is covered by the integration tests, which now check it for pages, the feed and static assets alike.

Builds on top of #93, #136 and #147
Refs #145 and https://github.com/clue-engineering/miley/pull/94 (private)

@clue clue added the new feature New feature or request label Sep 20, 2026
@clue
clue requested a lite review from Copilot September 20, 2026 00:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Address caching for redirects/errors and document the mod_headers requirement for non-Docker deployments.

Review effort: Lite
Findings: None

What changed in this PR

Adds a one-day Cache-Control policy for Apache-served pages and static assets.

Changes:

  • Adds Cache-Control: max-age=86400.
  • Enables Apache mod_headers.
  • Extends integration tests.
  • Removes outdated README caching documentation.
File Summary
www/​.htaccess Adds the cache header. Moderate findings: it excludes redirects/errors and requires documented mod_headers support.
tests/​integration.bash Verifies caching headers for pages, feeds, and assets.
README.md Removes obsolete caching documentation.
Dockerfile Enables Apache mod_headers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@clue
clue merged commit 03aeff9 into clue:main Sep 20, 2026
2 checks passed
@clue
clue deleted the cache-control branch September 20, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants