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

Document purging one page or selected tags with purge-http-cache --path / --tag

Đã đóng Phù hợp với người mới
#193 0 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kubernetes, php
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Bắt đầu từ trang tài liệu về HTTP cache và các lệnh console, rồi tìm nơi mô tả silverback:api-components:purge-http-cache. Hành vi cần ghi lại nằm trong PR 396 của api-components-bundle được liên kết: kiểm tra các tùy chọn --path và --tag, mã thoát, và xác nhận POST /_/http_cache/purge không thay đổi. Hoàn thành khi trang bao gồm cả hai tùy chọn, mã thoát, ví dụ kubectl exec, và ghi chú rằng endpoint HTTP chỉ xóa toàn bộ cache.

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

Mô tả

api-components-bundle PR: https://github.com/components-web-app/api-components-bundle/pull/396 (closes components-web-app/api-components-bundle#390; background components-web-app/components-web-app#138).

What to document (API bundle, HTTP cache / console commands page):

  • silverback:api-components:purge-http-cache with no options still flushes the whole cache (Souin only).
  • --path </path> (repeatable) purges one page: it purges the tag a write to the route at that path purges, <route import prefix>/_/routes/<path> (in the template /_api/_/routes//about-us). Works whether or not a route still exists at that path.
  • --tag <tag> (repeatable) purges any tag, e.g. cwa-html or a resource IRI.
  • Either option purges only those tags through the configured purger, never a full flush. With Souin it is a surrogate-key purge, so with the template's Cloudflare provider it also purges Cloudflare (a URL PURGE against the site does not work; see components-web-app#138).
  • How to run it in the template: kubectl exec -n <ns> deploy/<release> -c cwa-php -- bin/console silverback:api-components:purge-http-cache --path /about-us.
  • Exit codes: 0 on success, and also when no purger is configured (nothing purged, says so); 1 when the purge request fails; 2 for a tag containing a space or comma, or a --path not starting with /.
  • The HTTP endpoint POST /_/http_cache/purge is unchanged: whole-cache flush only.
Ngôn ngữ chính
Vue
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ề CLI

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.