Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Cache settings: CADDY_CACHE_BACKEND_TIMEOUT, CADDY_CACHE_STORAGE, extra-only CADDY_CACHE_EXTRA_CONFIG, two-pass postStart warm, scoped purges (template #170)

Đã đóng
#254 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kubernetes

Hướng nghiên cứu

Read the template changelog and the existing caching and Kubernetes deploy pages after the template fix is released. Update the cache settings, upgrade note, pod warm-up behavior, and scoped purge guidance described here; check the referenced template and bundle issues for released details. Done when the docs match the released behavior and explain when to use scoped purges versus a full flush.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Template components-web-app#170 (cold cache after a rollout or full flush gave Cloudflare 504s on a heavy CMS page). Fix on the template branch fix/cold-cache-170, landing in the next template release after 2.0.0-alpha.37; the template's CHANGELOG.md will link the final commits. Document it once it's released.

Cache settings (variables / caching page)

  • New CADDY_CACHE_BACKEND_TIMEOUT (default 30s, was Souin's 10 s): how long Souin waits for the origin before a 504. A cold CMS page that takes ~12 s is now served and cached instead of 504ing. Optional; on deploys set it as CWA_API_CADDY_CACHE_BACKEND_TIMEOUT. Must be a Go duration (45s, 1m30s); the deploy refuses anything else.
  • New CADDY_CACHE_STORAGE (default otter): the Souin store, now its own setting, so otter is used everywhere (dev and e2e too, not only deploys). On deploys: CWA_API_CADDY_CACHE_STORAGE. A store that isn't built into the image only fails when Caddy starts (php crash-loops), so check frankenphp build-info first.
  • CADDY_CACHE_EXTRA_CONFIG is now extra directives only: no store line and no timeout block. The deploy refuses both and names the variable to use instead (a second timeout block replaces the whole first one in Souin's parser, so it silently brought back the 10 s 504). Its old meaning ("otter" by default) is gone; remove any page that tells readers to set it to otter.
  • A CWA_API_ copy of CADDY_CACHE_CDN_CONFIG or CADDY_CACHE_EXTRA_CONFIG is refused (reserved); the error now says to set the plain CI variable.
  • Chart: php.caddy.storageConfig is renamed php.caddy.extraConfig and the secret key caddy-cache-storage-config is caddy-cache-extra-config (written only when set). No fallback.
  • Upgrade note to show: a project that set CADDY_CACHE_EXTRA_CONFIG to otter and/or a timeout { backend … } block deletes it in the same deploy as the template update, or the deploy fails.

Deploy / Kubernetes page (new pod warm, template #160)

  • The php pod's postStart now runs warm-http-cache twice: the gzip keys SSR uses, then --accept-encoding=br for the keys browsers and Cloudflare use. Each pass stops at CWA_CI_API_WARM_HTTP_CACHE_MAX_TIME (60 s); the whole hook is capped at 2 × that + 270 s (390 s by default); 0 still turns it off. A new pod can take up to that long before readiness.
  • Page HTML is not warmed in postStart (the deploy's purge drops it straight after the rollout; old PWA pods could render it with old /_nuxt hashes; reasons on #170). The post-deploy warm_cache still warms pages.

Purging (suggestion 3 on #170, agreed)

  • Steer content purges to silverback:api-components:purge-http-cache --path /<path> or --tag <tag> (bundle #390). Present the full flush ("Purge all cached data", purge-http-cache with no options) as a last resort: it empties the API entries too, and on a CMS-heavy page the next visitor waits for a full cold render (12 s on Cymru Kitchens' home page). Bundle side: components-web-app/api-components-bundle (issue linked in a comment below).
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
1 giờ 20 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của components-web-app/docs

Tất cả issue của components-web-app/docs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.