Skip to content

Add wp theme cache command#494

Draft
Copilot wants to merge 11 commits intomainfrom
copilot/add-wp-theme-cache-command
Draft

Add wp theme cache command#494
Copilot wants to merge 11 commits intomainfrom
copilot/add-wp-theme-cache-command

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

  • Create Theme_Cache_Command.php class with clear and flush methods
  • Register 'theme cache' command in extension-command.php
  • Add Behat tests for theme cache commands
  • Update phpcs.xml.dist to exclude Theme_Cache_Command from prefix rule
  • Update composer.json with new commands
  • Verify code passes linting, code style, and static analysis checks
  • Run code review and security checks
  • Use WP_Theme::cache_delete() method instead of manual cache key construction
  • Implementation complete and ready for review
Original prompt

This section details on the original issue you should resolve

<issue_title>Add wp theme cache command</issue_title>
<issue_description>## Feature Request

Describe your use case and the problem you are facing

Add the following commands

wp theme cache <theme> get <key> 
wp theme cache <theme> add <key> <data>
wp theme cache <theme> delete

Describe the solution you'd like

Add command would map to the method cache_add on WP_Theme class.
Get command would map to the method cache_get on WP_Theme class.
Delete command would map to the method cache_delete on WP_Theme class.

This would help manage and clear theme related caches.

</issue_description>

Comments on the Issue (you are @copilot in this section)

@danielbachhuber I amenable to this. Feel free to submit a pull request, if you'd like. Here is some [guidance on our pull request best practices](https://make.wordpress.org/cli/handbook/contributions/pull-requests/). @swissspidy `WP_Theme::cache_add()` and `WP_Theme::cache_get()` are private, so we can't really use these.

The delete method is public, but maybe this could be used via wp cache delete and wp cache flush-group? The cache key property itself is also private though, so we can't really access it.</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
@github-actions github-actions bot added command:theme Related to 'theme' command scope:distribution Related to distribution state:unconfirmed labels Feb 2, 2026
Copilot AI changed the title [WIP] Add wp theme cache command functionality Add wp theme cache command Feb 2, 2026
Copilot AI requested a review from swissspidy February 2, 2026 14:05
@codecov

This comment was marked as resolved.

@swissspidy swissspidy marked this pull request as ready for review February 4, 2026 01:56
@swissspidy swissspidy requested a review from a team as a code owner February 4, 2026 01:56
Copilot AI review requested due to automatic review settings February 4, 2026 01:56

This comment was marked as resolved.

swissspidy and others added 2 commits February 3, 2026 21:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 16, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • developer.wordpress.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@swissspidy swissspidy mentioned this pull request Feb 17, 2026
1 task
@swissspidy swissspidy marked this pull request as draft February 17, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:theme Related to 'theme' command scope:distribution Related to distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add wp theme cache command

2 participants