Add UI to invalidate cache for individual images directly from WordPress
維護者通常 1 天內回覆
評估
研究方向
首先追蹤現有的 WordPress 儀表板快取控制項以及 POST /api/optml/v2/cache/invalidate/asset 端點。確定如何透過 Media Library 操作或 Optimole 設定輸入,使用網站的 API 憑證透過 API 提交選取的圖片 URL。目標失效操作能夠正常運作,且管理員收到清楚的成功或失敗通知,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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/assetbackend 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.
- 主要語言
- PHP
- 星號
- 73
- 分支
- 14
- 平均合併
- 2 天 12 小時
- 30 天內合併 PR
- 18
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Codeinwp/optimole-wp 的其他 Issue
-
bug-report bug-report-triage crash-report regression
難度 4/5 3-5 天 新手友好度 45/100
Codeinwp/optimole-wp#1163 ·
維護者通常 1 天內回覆
-
bug-report bug-report-triage crash-report
難度 4/5 3-5 天 新手友好度 65/100
Codeinwp/optimole-wp#1162 ·
維護者通常 1 天內回覆
-
customer report feature-request-triage
難度 3/5 1-2 天 新手友好度 65/100
Codeinwp/optimole-wp#1161 ·
維護者通常 1 天內回覆
-
bug-report bug-report-triage customer report regression
難度 4/5 3-5 天 新手友好度 56/100
Codeinwp/optimole-wp#1159 ·
維護者通常 1 天內回覆
-
customer report feature-request-triage
難度 3/5 1-2 天 新手友好度 55/100
Codeinwp/optimole-wp#1151 ·
維護者通常 1 天內回覆
查看 Codeinwp/optimole-wp 的全部 Issue
相似的 Issue
-
sync-en
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
bug Feature: Kiosk
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
Infrastructure: actions Module: zmscitizenapi Module: zmsentities php Type: Bug unit tests
難度 2/5 1-3 小時 新手友好度 88/100
it-at-m/eappointment#3480 ·
維護者通常 1 天內回覆
-
HttpClient
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
CI: composer install fails — league/flysystem 1.x blocked by security advisory GHSA-cxf4-7mrp-vvpr未關閉devops type: bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆