Skip to content

validate haproxy caching behavior #199

Closed

Description

@PhilipTrauner

OHF-Device-Database/frontend#66 introduced a new astro caching provider that emits standard http caching headers instead of using astro's built-in in-memory cache, eliminating the need to issue requests within the validity window of a resource

what still needs to be evaluated before this is rolled out, is if the haproxy setup just passes these headers through, or if it attempts to do some caching on its own

Activity

  1. djwmarcx commented on Nov 9, 2026

    @djwmarcx

    The HAProxy template has no cache section, no cache filter, no cache-use or cache-store directive, no compression filter, and no response rule that adds, removes or rewrites headers. So no problem on that side.

    Evaluating cloudflare now

  2. djwmarcx commented on Nov 9, 2026

    @djwmarcx

    Cloudflare does not cache HTML by default and ignores Vary, so before today every page was cf-cache-status: DYNAMIC regardless of what the origin sent. Two Cache Rules now exist on the zone for device-database-preview.openhomefoundation.org:

    • cache per origin Cache-Control: anonymous requests (no cookie, no Authorization, no ?feature=) are eligible for cache, edge TTL "use Cache-Control if present, bypass if not", browser TTL "respect origin".
    • bypass personalized requests: anything with a cookie, an Authorization header or feature= in the query bypasses the cache, so a signed-in or feature-flagged visitor can never be served an anonymous copy.

    Once the release with the cache provider ships, anonymous pages should go MISS then HIT:

    curl -sI https://device-database-preview.openhomefoundation.org/browse | grep -i -E 'cache-control|cf-cache-status|age'
    curl -sI -H 'Cookie: x=1' https://device-database-preview.openhomefoundation.org/browse | grep -i cf-cache-status   # DYNAMIC
    
  3. moved this from Next to Validation in Device Databaseon Nov 11, 2026
  4. moved this from Validation to Done in Device Databaseon Nov 11, 2026
  5. closed this as completedby moving to Done in Device Databaseon Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions