Image caching performance issue

I was watching a game and noticed some fishy looking caching behavior. I captured about 3 minutes of traffic and asked Claude to analyze the caching, and it was able to identify an issue with the tcgone.nettcg.one 302s.

Here are the findings and suggested fixes:


Card scans load via a redirect: tcgone.net/scans/... → 302 → tcg.one/.... The image on tcg.one caches great (immutable, served from disk in ~6 ms). But the 302 has no Cache-Control/Expires (cf-cache-status: BYPASS), so the browser re-fetches the redirect over the network on every display — even though it already has the image cached.

Each of those redirect hops took ~190–320 ms (up to 715 ms) in my capture. In one ~3-min game that was 25 redundant round-trips that only returned a Location the browser already knew.

Fix (any one):

  • Best: emit the tcg.one/... URL directly, no redirect.

  • Or switch 302 → 301 (cacheable by default — the mapping is permanent).

  • Or add Cache-Control: public, max-age=86400 to the 302.

1 Like

Hey, thanks for the report! Will be fixed along with the next version!

That’s a good set of eyes there. I wonder what else they can catch :wink:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.