wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Hosting cache not cleared when clearing Performance Hints for current URL

Open hanna-meda opened this issue 1 year ago • 5 comments

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version ✓ 3.17/6845-subtask-data-clearing-notices
  • Used the search feature to ensure that the bug hasn’t been reported before ✓

Describe the bug Hosting cache not cleared when clicking on "Clear Performance Hints for current URL" from admin page view.

To Reproduce Preconditions: Site hosted on Cloudways (https://cloudways.rocketlabsqa.ovh/) Preload disabled

Steps to reproduce the behavior:

  1. Cache a page with lcp or above the fold images. > The x-cache header's value should be HIT. If it isn't, hard refresh the page until it is
  2. From page view, click "Clear Performance Hints of this URL" then visit the page incognito.
  3. Check again the X-cache header's value. > See that value is still HIT.

Expected behavior The value of the X-cache header should be MISS after clicking on the "Clear Performance Hints of this URL".

Note: Using "Purge this URL" or "Clear Performance Hints data" will work.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming

hanna-meda avatar Aug 21 '24 14:08 hanna-meda

Is this still an issue @hanna-meda after merging this https://github.com/wp-media/wp-rocket/pull/6886 ?

Khadreal avatar Aug 26 '24 12:08 Khadreal

@Khadreal just tested with 3.17-alpha1 on cloudways.rocketlabsqa site and, unfortunately, the issue is still there Screenshot 2024-08-26 at 16 20 19

hanna-meda avatar Aug 26 '24 13:08 hanna-meda

I think we need to add rocket_performance_hints_data_after_clearing in https://github.com/wp-media/wp-rocket/blob/fb50ef3b9db98b09b4b90797f5c16117a1560435/inc/ThirdParty/Plugins/CDN/Cloudflare.php#L76 Haven't been able to test it yet.

[Updated] This is wrong, I tested this and not related

Khadreal avatar Aug 28 '24 10:08 Khadreal

Created a PR to fix this, added the performance hints callback to varnish subscriber.

Khadreal avatar Aug 28 '24 12:08 Khadreal

Related TP HERE.

hanna-meda avatar Aug 29 '24 13:08 hanna-meda