Skip to content

[WIP] Add UI to invalidate cache for individual images#1071

Closed
Claude wants to merge 2 commits into
masterfrom
claude/add-ui-invalidate-cache
Closed

[WIP] Add UI to invalidate cache for individual images#1071
Claude wants to merge 2 commits into
masterfrom
claude/add-ui-invalidate-cache

Conversation

@Claude

@Claude Claude 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 @claude[agent] in this section)

Agent-Logs-Url: https://github.com/Codeinwp/optimole-wp/sessions/72e42786-f8e6-43cc-bb86-13a8dcab34be

Co-authored-by: kushh23 <110405452+kushh23@users.noreply.github.com>
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