Skip to content

Boost Page Cache: make module off when Endurance Page Cache is on #43416

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

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented May 9, 2025

Fixes HOG-96

Proposed changes:

When a site already uses the Endurance Page Cache service, and that service is active on the site, we should not offer the option to turn on Boost's page cache.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

  • p1746778589553919-slack-C016BBAFHHS

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

Note

Test this on a site using Endurance page cache. See HOG-96.
Alternatively, you can set add_filter( 'jetpack_boost_compatibility_has_cache', '__return_true' ); in your testing environment to mock things.

  • Go to Settings > General
  • Scroll down to the bottom of the page
  • Change settings to activate or deactivate page cache
  • Go to Jetpack > Boost
  • The Page Cache module availability should be updated accordingly. A notice should be displayed
Screenshot 2025-05-09 at 12 03 52

Fixes HOG-96

When a site already uses the Endurance Page Cache service, and that service is active on the site, we should not offer the option to turn on Boost's page cache.
@jeherve jeherve self-assigned this May 9, 2025
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Status] In Progress [Pri] Normal [Focus] Compatibility Ensuring our products play well with third-parties [Boost Feature] Page Cache labels May 9, 2025
@github-actions github-actions bot added the [Plugin] Boost A feature to speed up the site and improve performance. label May 9, 2025
Copy link
Contributor

github-actions bot commented May 9, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Boost plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

Copy link

jp-launch-control bot commented May 9, 2025

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/plugins/boost/app/modules/optimizations/page-cache/class-page-cache.php 2/37 (5.41%) -0.31% 2 ❤️‍🩹
projects/plugins/boost/app/admin/class-config.php 37/37 (100.00%) 0.00% 0 💚

2 files are newly checked for coverage.

File Coverage
projects/plugins/boost/app/assets/src/js/lib/utils/caching.ts 0/2 (0.00%) 💔
projects/plugins/boost/app/lib/class-cache-compatibility.php 6/7 (85.71%) 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

@github-actions github-actions bot added the Admin Page React-powered dashboard under the Jetpack menu label May 9, 2025
So far only using the filter, since the Endurance_Page_Cache class doesn't exist in our codebase.
@jeherve jeherve added [Status] Needs Review This PR is ready for review. I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. and removed [Status] In Progress labels May 9, 2025
@jeherve jeherve requested a review from dilirity May 9, 2025 13:06
Copy link
Member

@dilirity dilirity left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks for taking care of this and including tests!

It's ready for a merge.

When I saw the notice that Page Cache is unavailable, I recalled a conversation about users on WoA being unable to activate Boost's cache. As a result, we ended up updating the UI to this:

CleanShot 2025-05-13 at 11 14 53

I wonder if it makes sense to update the current notice to be in the same style, but say "your hosting" instead of "WordPress.com". If we do, we can do it in a follow up. I just wanted your thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Boost Feature] Page Cache [Focus] Compatibility Ensuring our products play well with third-parties I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Plugin] Boost A feature to speed up the site and improve performance. [Pri] Normal [Status] Needs Review This PR is ready for review. [Tests] Includes Tests [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants