perf: cache product version archive inspection - #37
Conversation
|
Warning Review limit reached
Next review available in: 23 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughProduct version caching now uses shared WordPress object caching with transient fallback. Remote archive metadata supports positive and negative cache entries with separate expiration periods. Regression tests cover cache hits, failures, invalidation, and fallback behavior. ChangesProduct Version Caching
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Product_Versions
participant SharedCache
participant RemoteArchive
Product_Versions->>SharedCache: Read remote metadata
alt Cache hit
SharedCache-->>Product_Versions: Return positive or negative result
else Cache miss
Product_Versions->>RemoteArchive: Inspect archive
RemoteArchive-->>Product_Versions: Return metadata or failure
Product_Versions->>SharedCache: Store result with expiration
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@inc/class-product-versions.php`:
- Line 791: Update clear_cache() around self::delete_cached_value('versions_' .
$product_id) to also invalidate the current product’s remote_version_* download
metadata keys, ensuring archive replacements with unchanged identifiers do not
reuse stale remote metadata. Use the existing product download metadata key
scheme and preserve the current versions cache invalidation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bea13144-0e21-419d-8c9e-af16548b5cde
📒 Files selected for processing (2)
inc/class-product-versions.phptests/product-versions-remote-download-regression.php
Summary
Verification
composer test../../../../vendor/bin/phpcs inc/class-product-versions.php tests/product-versions-remote-download-regression.phpgit diff --check origin/main...HEADaidevops.sh v3.32.250 plugin for OpenCode v1.18.9 with gpt-5.6-sol spent 5m and 200,459 tokens on this with the user in an interactive session.
Summary by CodeRabbit
Bug Fixes
Tests