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

Category pages not cached when additions added to path

Open joejoe04 opened this issue 10 months ago • 7 comments

Describe the bug The general pattern of the issue is that a page like this one is cached: https://example.com/product-category/powerflex/

While ones like this are not cached: https://example.com/product-category/powerflex/filters/powerflex-car-model/alto-1987-2011/

This is in relation to the following WooCommerce Ajax Products Filter plugin (though I suppose it could happen with other plugins that do similar things with URL paths): https://berocket.com/woocommerce-ajax-products-filter/

When filters are applied to the first page above, the filter function works by adding the additional parts to the page's path, and we get the 2nd URL not cached.

Rocket Debug shows the following reasons: Page not cached by filter. Buffer content under 255 characters.

For additional context, we made this update some time ago to prevent caching for invalid taxomonies: https://github.com/wp-media/wp-rocket/pull/6984

However, it seems that change has caused some pages that are valid, like the one above, to not be cached.

Expected behavior The valid taxonomy pages should be cached while still not allowing invalid taxonomy pages to be cached.

Screenshots https://imagizer.imageshack.com/a/img923/6659/lbFRCE.png

Additional context

Ticket: https://secure.helpscout.net/conversation/2841718115/539402

Slack: https://wp-media.slack.com/archives/C07PZNW7BJ5/p1739203324588729?thread_ts=1739169608.110309&cid=C07PZNW7BJ5

joejoe04 avatar Feb 10 '25 20:02 joejoe04

Also had a related case here: https://secure.helpscout.net/conversation/2832222833/537596 In this case, the URLs were modified with Rewrite rules.

suzoutlet avatar Feb 12 '25 18:02 suzoutlet

Had this kind of case here: https://secure.helpscout.net/conversation/2840308531/539144

juricazuanovic avatar Feb 12 '25 18:02 juricazuanovic

Another case: https://secure.helpscout.net/conversation/2844780797/539991?viewId=2952229

mifrero avatar Feb 13 '25 12:02 mifrero

We'll add a filter to disable this feature completely when needed.

Khadreal avatar Feb 17 '25 14:02 Khadreal

Related: https://secure.helpscout.net/conversation/2849118004/540763

joejoe04 avatar Feb 18 '25 13:02 joejoe04

Related case here: https://secure.helpscout.net/conversation/2869929307/544812?viewId=8127831

jekayode avatar Mar 11 '25 04:03 jekayode

related: https://secure.helpscout.net/conversation/3114455679/594133?viewId=7406897

rosamillan avatar Oct 23 '25 18:10 rosamillan