SSWConsulting / SSWConsulting/SSW.Website
💸 Perf - Raise minimumCacheTTL so optimised images are cacheable
@isaaclombardssw is already working on this.
Since Jul 23, 2026.
- Dominant language
- HTML
- Stars
- 14
- Forks
- 10
- Avg merge
- 13h 51m
- Merged PRs (30d)
- 38
Description
Sub-issue of the AI for Business Leaders performance PBI. Fully isolated one-line change — can be picked up at any point.
Description
next.config.mjs sets:
images: {
minimumCacheTTL: 60,
...
}
Every /_next/image response therefore carries a 60-second cache lifetime. This is Lighthouse's "Use efficient cache lifetimes — Est savings of 246 KiB": repeat visitors and multi-page sessions re-download every optimised image.
Proposed solution
Raise minimumCacheTTL to a long value (a year, 31536000, is the usual choice). Image URLs are keyed on the source path plus width and quality, so a content change means a new upload path from Tina and a new URL — a long TTL is safe.
Check at the same time whether the CDN/host in front of the app is overriding the header, in which case it needs the same treatment.
Acceptance criteria
/_next/imageresponses carry a longCache-Controlmax-age- Lighthouse's "Use efficient cache lifetimes" no longer lists optimised images
- Replacing an image in Tina still shows the new image without a manual purge
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.