Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add UI to invalidate cache for individual images directly from WordPress

未关闭
#1,069 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #1070 来自 @openai-code-agent —— 已关闭,未合并
  • #1071 来自 @anthropic-code-agent —— 已关闭,未合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
php, wordpress
领域
api, web-dev

调研方向

首先跟踪现有的 WordPress 仪表盘缓存控制项以及 POST /api/optml/v2/cache/invalidate/asset 端点。确定如何通过 Media Library 操作或 Optimole 设置输入,使用站点的 API 凭据通过 API 提交选定的图像 URL。目标失效操作能够正常工作,并且管理员收到清晰的成功或失败通知,即表示完成。

由索引模型根据 Issue 内容生成。

描述

customer report
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

主要语言
PHP
星标
73
派生
14
平均合并
2 天 13 小时
30 天内合并 PR
16

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Codeinwp/optimole-wp 的其他 Issue

查看 Codeinwp/optimole-wp 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。