Skip to content

Cache missing app icons per deployment - #305

Merged
tnkuehne merged 1 commit into
mainfrom
cache-missing-app-icons
Nov 22, 2026
Merged

tnkuehne merged 1 commit into
mainfrom
cache-missing-app-icons

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

App lists show an icon for every app with an active deployment. The icon URL names that deployment, so a found icon is cached until the next deploy. A deployment without a favicon answered with an uncached 404. Each view of the overview, the apps list or My connections therefore asked again for every app without an icon, all at the same time.

Now a visible app whose deployment has no favicon gets a 404 with the same cache header as an icon, but only when the URL names the active deployment. Browsers then stop asking after the first view. When the app is deployed again, the URL changes, and a newly added icon appears.

Unchanged, and still uncached:

  • 404s for apps the viewer may not see. Once access is granted, the icon appears.
  • URLs without the active deployment.
  • Storage misses and size mismatches.

The icon lookup also reads without a transaction, like the other hot reads.

Tested by: platform.integration.test.ts (cached miss, uncached miss without deployment, outsider stays uncached), and the e2e icon tests in auth.spec.ts and organization-writes.spec.ts.

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

The PR appears safe to merge; no actionable issues were found.

Summary

Missing app icons now return a privately cacheable 404 when the URL names the active deployment.

  • Visible apps keep missing icons cached for their active deployment.
  • Icon lookups read directly without opening a transaction.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Request app icon] --> B{Visible active app?}
  B -->|No| C[Existing error response]
  B -->|Yes| D{Manifest has an icon?}
  D -->|Yes| E[Read and check stored bytes]
  E --> F[Return icon or existing error]
  D -->|No| G[Return empty 404]
  G --> H{URL names active deployment?}
  H -->|Yes| I[Private immutable cache]
  H -->|No| J[Private cache with revalidation]
Loading

Reviews (1) · Last reviewed commit: "Cache missing app icons per deployment" · Reviewed by Greptile

A visible app whose active deployment has no favicon now answers its
deployment-addressed icon URL with a 404 that browsers keep as long as
an icon. Pages no longer ask again for every icon-less app on each view.
Inaccessible apps and URLs without the active deployment stay uncached.
The icon lookup also reads without a transaction.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 2056d93 Nov 22 2026, 04:17 PM

@tnkuehne
tnkuehne merged commit 35cd7cb into main Nov 22, 2026
16 checks passed
@tnkuehne
tnkuehne deleted the cache-missing-app-icons branch November 22, 2026 16:23
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.

1 participant