Codeinwp / Codeinwp/optimole-wp

Add UI to invalidate cache for individual images directly from WordPress

Open
#1,069 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #1070 by @openai-code-agent — closed without merging
  • #1071 by @anthropic-code-agent — closed without merging
customer report
Dominant language
PHP
Stars
72
Forks
14
Avg merge
2d 9h
Merged PRs (30d)
15

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

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.

Research direction

Start by tracing the existing WordPress dashboard cache controls and the POST /api/optml/v2/cache/invalidate/asset endpoint. Determine how a Media Library action or Optimole settings input can submit selected image URLs using the site's API credentials. Done means targeted invalidation works and the admin receives a clear success or failure notice.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
api, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.