Skip to content

Add static cache purge commands#190

Merged
timkelty merged 1 commit into
3.xfrom
timkelty/add-static-cache-purge-command
Jul 21, 2026
Merged

Add static cache purge commands#190
timkelty merged 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 with the environment-first URI/CDN tags introduced by #191, so gateway failures 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 Outdated
@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
@timkelty
timkelty marked this pull request as draft July 21, 2026 17:33
Copilot AI review requested due to automatic review settings July 21, 2026 17:34
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from f1c9d49 to 0c11bd3 Compare July 21, 2026 17:34

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 21, 2026 18:07
@timkelty
timkelty marked this pull request as draft July 21, 2026 18:29
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from 0c11bd3 to 4068374 Compare July 21, 2026 18:29
Copilot AI review requested due to automatic review settings July 21, 2026 18:29

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 force-pushed the timkelty/add-static-cache-purge-command branch from 4068374 to 67942bb Compare July 21, 2026 18:36
Copilot AI review requested due to automatic review settings July 21, 2026 18:36

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 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread src/cli/controllers/StaticCacheController.php
Comment thread src/cli/controllers/StaticCacheController.php
Comment thread src/cli/controllers/StaticCacheController.php
Comment thread tests/unit/StaticCacheControllerTest.php
Copilot AI review requested due to automatic review settings July 21, 2026 18:44
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from 67942bb to 93a4310 Compare July 21, 2026 18:44

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 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/cli/controllers/StaticCacheController.php
Comment thread src/cli/controllers/StaticCacheController.php
Copilot AI review requested due to automatic review settings July 21, 2026 18:50
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from 93a4310 to f86c7e9 Compare July 21, 2026 18:50

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 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread tests/unit/StaticCacheControllerTest.php
Comment thread tests/unit/StaticCacheControllerTest.php
Copilot AI review requested due to automatic review settings July 21, 2026 18:54
@timkelty
timkelty force-pushed the timkelty/add-static-cache-purge-command branch from f86c7e9 to b7aa7ee Compare July 21, 2026 18:54

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 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread src/StaticCache.php
@timkelty
timkelty marked this pull request as ready for review July 21, 2026 19:20
@timkelty
timkelty merged commit ae0dc48 into 3.x Jul 21, 2026
10 checks passed
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