Freestruct Docs

Cache Busting Feature

Status: COMPLETE in v0.1.1

Problem

Solution (Implemented)

freestruct now provides two independent mechanisms:

  1. Automatic Hash Injection (always on):
    • SHA1 build hash generated per build from config + timestamp
    • Injects <meta name="freestruct-build" content="{hash}"> into every page
    • Adds ?v={hash} query param to canonical URLs
    • No configuration needed - works out of the box
  2. Purge Hooks (optional):
    • Run ANY shell command post-build
    • Supports any CDN or cache system
    • Config in ssr-config.yml:
      cacheBusting:
        purge:
          - name: cloudflare
            command: curl -X DELETE "https://api.cloudflare.com/..." -H "Authorization: Bearer $TOKEN"
      
    • Available variables: $SITE_URL, $BUILD_HASH, $OUTPUT_DIR

Why It’s Agnostic

Verified Working

Future Enhancements