Skip to content

Add static cache purge commands#190

Open
timkelty wants to merge 1 commit into
3.xfrom
timkelty/add-static-cache-purge-command
Open

Add static cache purge commands#190
timkelty wants to merge 1 commit into
3.xfrom
timkelty/add-static-cache-purge-command

Conversation

@timkelty

@timkelty timkelty commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds explicit cloud/static-cache/purge-all, cloud/static-cache/purge-cdn, and cloud/static-cache/purge-origin commands. Purges run synchronously so failed gateway requests fail the command.

Copilot AI review requested due to automatic review settings July 20, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CLI entrypoint to explicitly purge the static cache (origin, CDN, or both), ensuring invocations without an explicit selector fail fast instead of becoming a no-op. This fits into the existing Cloud CLI controller set and complements the existing purge-prefixes and purge-tags actions.

Changes:

  • Added cloud/static-cache/purge with --all, --origin, and --cdn options and validation that at least one is provided.
  • Implemented purge dispatching to StaticCache::purgeOrigin(), purgeCdn(), or purgeAll() depending on selected options.
  • Added unit tests covering option registration, dispatch behavior, and missing-selector failure.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/cli/controllers/StaticCacheController.php Adds the new purge action and registers the new CLI options for selecting which cache(s) to purge.
tests/unit/StaticCacheControllerTest.php Adds unit coverage for the new purge command’s options, behavior, and required-selector validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@timkelty
timkelty marked this pull request as ready for review July 20, 2026 13:13
@timkelty
timkelty marked this pull request as draft July 20, 2026 16:46
Copilot AI review requested due to automatic review settings July 20, 2026 16:48
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from 7babb95 to 3c8c359 Compare July 20, 2026 16:48
@timkelty timkelty changed the title Add static cache purge command Add static cache purge commands Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@timkelty
timkelty marked this pull request as ready for review July 20, 2026 16:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c8c3591b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/controllers/StaticCacheController.php
@timkelty
timkelty marked this pull request as draft July 20, 2026 17:00
Copilot AI review requested due to automatic review settings July 20, 2026 17:02
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from 3c8c359 to f1c9d49 Compare July 20, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@timkelty
timkelty marked this pull request as ready for review July 20, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants