Support --all for `wp embed cache clear`

Open
#67 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php, sql
Domain
cli, databases

Research direction

Start by reading the existing wp embed cache clear command and the WordPress SQL statements described in the issue. Resolve whether the interface should be --all or cache clear-all, then verify that the completed change clears all oEmbed cache data while preserving the existing targeted behavior.

Written by the indexing model from the issue text.

Description

command:embed-cache command:embed-cache-clear

Feature Request

Describe your use case and the problem you are facing

There's currently no way of completely clearing the oembed cache. This is for example useful after one has added a oembed_dataparse filter to modify the HTML.

Describe the solution you'd like

I'd propose adding an cache clear-all command.

The quick and dirty version is to run DELETE FROM wp_posts WHERE post_type = 'oembed_cache' and DELETE FROM wp_postmeta WHERE meta_key LIKE '_oembed_%'.

Dominant language
Gherkin
Stars
8
Forks
11
Avg merge
26m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.