Skip to content

Cache updates API response to reduce redundant HTTP calls#12

Merged
shazzad merged 2 commits into
mainfrom
cache-updates-response
Feb 26, 2026
Merged

Cache updates API response to reduce redundant HTTP calls#12
shazzad merged 2 commits into
mainfrom
cache-updates-response

Conversation

@shazzad
Copy link
Copy Markdown
Owner

@shazzad shazzad commented Feb 26, 2026

Add short-lived site transient cache (10 min default) to Client::updates() to avoid hitting the remote API on every set_site_transient call. Cache is cleared automatically in clear_updates_transient() and refresh_updates_transient(). Cache period is configurable via argument, pass 0 to bypass.

Closes #11

shazzad and others added 2 commits February 27, 2026 00:36
Add short-lived site transient cache (10 min default) to Client::updates()
to avoid hitting the remote API on every set_site_transient call. Cache is
cleared automatically in clear_updates_transient() and
refresh_updates_transient(). Cache period is configurable via argument,
pass 0 to bypass.

Closes #11

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the same short-lived transient cache (10 min default) to
Client::details() that was added to updates(). The details endpoint is
called from both plugins_api and the license admin page. Both caches are
cleared together in clear_updates_transient() and
refresh_updates_transient().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shazzad shazzad merged commit 2c25456 into main Feb 26, 2026
1 check passed
@shazzad shazzad deleted the cache-updates-response branch February 26, 2026 19:20
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.

Cache API responses to reduce redundant HTTP calls

1 participant