Skip to content

[WIP] Add UI to invalidate cache for individual images from WordPress#1070

Closed
Codex wants to merge 1 commit into
masterfrom
codex/add-ui-invalidate-cache
Closed

[WIP] Add UI to invalidate cache for individual images from WordPress#1070
Codex wants to merge 1 commit into
masterfrom
codex/add-ui-invalidate-cache

Conversation

@Codex

@Codex Codex AI commented May 26, 2026

Copy link
Copy Markdown

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>Add UI to invalidate cache for individual images directly from WordPress</issue_title>
<issue_description>### Problem
Currently, when a user wants to clear the cache for a specific updated image from the WordPress dashboard, their only option is to regenerate the entire Optimole image cache. Flushing the entire cache for a single image update is highly inefficient and disruptive for high-traffic sites. While there is an API available to invalidate specific assets, it is inaccessible to non-technical WP admins.

Desired Behavior

Provide a setting or action within the WordPress dashboard to dump the cache for a single image or a small selection of images. This could be exposed as a bulk action/row action in the native WP Media Library or an input field in the Optimole settings where an admin can paste specific URLs to clear.

Acceptance Criteria

  • Provide a UI control within the WordPress admin (e.g., in Media Library and/or Optimole settings) to trigger cache invalidation for specific images.
  • The action securely triggers the existing POST /api/optml/v2/cache/invalidate/asset backend endpoint using the site's API credentials.
  • An admin notice clearly confirms whether the single-image cache was successfully refreshed or if it failed.

Customer Context

An agency partner managing high-traffic sites requests a targeted way to clear cache for individual images via the WordPress backend. Regenerating the entire cache is too heavy-handed, and their team cannot easily use the Optimole REST API.

https://secure.helpscout.net/conversation/3293257808/487980</issue_description>

<agent_instructions>Add this feature in the media page in list and grid mode as a shortcut link, like how offload to Optimole quick link is present</agent_instructions>

Comments on the Issue (you are @codex[agent] in this section)

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