Skip to content

Fix/release cache#8

Merged
soderlind merged 2 commits intomainfrom
fix/release-cache
Mar 8, 2026
Merged

Fix/release cache#8
soderlind merged 2 commits intomainfrom
fix/release-cache

Conversation

@soderlind
Copy link
Owner

This pull request releases version 1.2.4 of the plugin, focusing on improving error handling for GitHub release lookups to avoid hitting unauthenticated API rate limits. The update ensures that failed lookups are cached for 15 minutes, preventing repeated failed requests from exhausting the rate limit. The changelog, documentation, and tests have been updated accordingly.

Release and Documentation Updates:

  • Bumped version to 1.2.4 in package.json, vmfa.php, and updated the stable tag in readme.txt to reflect the new release. [1] [2] [3] [4]
  • Added changelog entries in both CHANGELOG.md and readme.txt describing the fix for GitHub API rate limiting. [1] [2]

Bug Fixes and Improvements:

  • Updated AddonManager.php to cache failed GitHub release lookups for 15 minutes by setting an empty transient, preventing repeated failed requests from hitting the unauthenticated API rate limit. [1] [2]

Testing Enhancements:

  • Enhanced unit tests in AddonManagerTest.php to verify that failed lookups correctly set the transient cache for 15 minutes. [1] [2]
  • Defined MINUTE_IN_SECONDS in the test bootstrap to support the new caching logic.

Prevents hitting the unauthenticated GitHub API rate limit (60/hr)
when releases don't exist or the API returns errors. Failed lookups
now cache an empty string for 15 minutes instead of retrying on
every page load.
- Cache failed GitHub API lookups for 15 minutes to prevent hitting
  the unauthenticated rate limit (60 req/hr).
- Add MINUTE_IN_SECONDS to test bootstrap.
- Add set_transient expectations to failure-path tests.
@soderlind soderlind merged commit 930b6c3 into main Mar 8, 2026
2 checks passed
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.

1 participant