Document the scoped HTTP cache purge body and http_cache.warm_after_flush (api-components-bundle #484)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- yaml
- Domain
- documentation
Research direction
Start in content/4.api/ and find the HTTP cache purge and bundle configuration pages. Document the scoped purge body, validation errors and status codes, then add the http_cache.warm_after_flush settings, Messenger routing, and behavior described in the issue. Done when the API docs explain both features, including that only a request with no body flushes the whole cache and that full flushes make pages cold.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 20m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from components-web-app/docs
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 43/100
components-web-app/docs#285 ·
-
documentation
Difficulty 4/5 1-2 days Newbie friendliness 35/100
components-web-app/docs#284 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
components-web-app/docs#283 ·
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
components-web-app/docs#282 ·
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 35/100
components-web-app/docs#281 ·
All issues in components-web-app/docs
Similar issues
-
area: repo priority: P2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
appandflow/stim#4107 · 1 comment ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 1-3 hours Newbie friendliness 60/100
lingdojo/kana-dojo#32859 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github/gh-aw-firewall#10364 ·
Maintainers usually reply within 1 day
-
Merge the duplicate kaffir_corn record into sorghumPossibly taken @Crypto-Shroom claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
drizzle-team/drizzle-orm#6552 ·
Maintainers usually reply within 2 days