Document the scoped HTTP cache purge body and http_cache.warm_after_flush (api-components-bundle #484)
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
- 78/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ệ
- yaml
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu trong content/4.api/ và tìm các trang về việc xóa bộ nhớ đệm HTTP và cấu hình bundle. Ghi lại phần thân yêu cầu dùng để xóa theo phạm vi, các lỗi xác thực và mã trạng thái, sau đó thêm cài đặt http_cache.warm_after_flush, định tuyến Messenger và hành vi được mô tả trong issue. Hoàn tất khi tài liệu API giải thích cả hai tính năng, bao gồm việc chỉ yêu cầu không có phần thân mới xóa toàn bộ bộ nhớ đệm và việc xóa toàn bộ khiến các trang ở trạng thái lạnh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
From components-web-app/api-components-bundle#484, implemented in components-web-app/api-components-bundle#487.
Please document the following in the API docs (content/4.api/):
Scoped purge: POST /_/http_cache/purge
ROLE_ADMIN. It is the HTTP version ofsilverback:api-components:purge-http-cache --path/--tag.- A body
{"paths": ["/about-us"], "tags": ["cwa-html"]}(either key or both) purges only those tags. Each path becomes the tag a write to the route at that path purges (the/_apiimport prefix is included), and the page is not looked up. It never flushes. Success is 204 with no body. - Only a request with no body at all flushes the whole cache.
{},null,[], malformed JSON, unknown keys, an empty or non-listpaths/tags, a path not starting with/, or a tag that is empty or has whitespace or a comma are all a 422, withpropertyPathpaths,tags,paths[i]ortags[i]. - 501 when no purger is configured (scoped) or the purger cannot flush (full); 502 when the purge fails.
- Present the full flush as a last resort: it makes every page render cold at once. A write already purges its own tags.
http_cache.warm_after_flush (off by default)
silverback_api_components:
http_cache:
warm_after_flush:
enabled: true
base_url: 'http://localhost' # the HTTP cache in front of the API, as warm-http-cache --base-url
max_time: 60 # seconds, for each encoding
concurrency: 2
timeout: 30
limit: ~ # most routes, shortest first; null = all until max_time
- After a successful full flush (the endpoint with no body,
purge-http-cachewith no options, every fixture load's flush), the bundle dispatches twoSilverback\ApiComponentsBundle\Message\WarmHttpCacheMessages onmessenger.default_bus: one withAccept-Encoding: gzip(SSR) and one withbr(browsers and CDN). Each runs thewarm-http-cachelogic over the public routes, shortest first, untilmax_time. - Route the message to an async transport and run a worker. Without async routing, the warm runs inside the request or command that flushed and holds a php worker. With no Messenger bus at all, nothing is warmed and a warning is logged.
- A failed dispatch is logged at error and never fails the flush. The setting changes no response.
framework:
messenger:
routing:
Silverback\ApiComponentsBundle\Message\WarmHttpCacheMessage: async
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của components-web-app/docs
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
components-web-app/docs#267 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
components-web-app/docs#266 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
components-web-app/docs#265 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
components-web-app/docs#264 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
components-web-app/docs#263 · 1 bình luận ·
Tất cả issue của components-web-app/docs
Issue tương tự
-
RED ladder stopped @ 4db4ed91Đang mởarea:workflow bug ready-for-human
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
fil-donadoni/tolaria#6108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/rocketmq-dashboard#7234 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vitest-dev/vitest#11656 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
Maintainer thường phản hồi trong vòng 1 ngày