Skip to content

Update PMC cache keys, and remove fallback cache #4398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

diegocurbelo
Copy link
Member

@diegocurbelo diegocurbelo commented Jun 5, 2025

Changes proposed in this Pull Request:

This PR removes the cache key prefix from the Payment_Method_Configurations class; it's no longer needed. #4370 included that logic into the Database Cache.

It also removes the fallback cache; the new database cache uses the same options table to store data, making it redundant.

Testing instructions

Code review.

Follow the original implementation testing instructions: #4331

Also, this Dev Tools plugin PR adds a way to see (and delete) the new database cache entries (with TTL and expiration), which makes things easier to test without manually checking the database with wp-cli:

Screenshot 2025-06-08 at 13 10 36


  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@diegocurbelo diegocurbelo marked this pull request as ready for review June 8, 2025 17:56
@diegocurbelo diegocurbelo requested review from a team and Mayisha June 8, 2025 17:56
Copy link
Contributor

@annemirasol annemirasol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Verified:

  • keys are prefixed correctly, e.g. wcstripe_cache_test_payment_method_configuration
  • no regression observed with caching

@diegocurbelo diegocurbelo merged commit c9127cd into develop Jun 11, 2025
51 checks passed
@diegocurbelo diegocurbelo deleted the tweak/remove-pmc-fallback-cache branch June 11, 2025 16:05
Copy link

📈 PHP Unit Code Coverage Report

Package Line Rate Health
includes/class-wc-stripe-payment-method-configurations.php 94%
Summary 44% (7156 / 16336)

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.

2 participants