wp-rocket
wp-rocket copied to clipboard
3.17 - LRC hashes must be injected when needed for SaaS visits
Context This is a sub-task of #6894 to handle the injection of LRC hashes for SaaS visits. The SaaS visits page with the query string: nowprocket=1&no_optimize=1&wpr_imagedimensions=1 This bypasses the injection of LRC hashes, preventing SaaS visits from generating valid LRC performance hints.
Expected behavior
Visits with the query string wpr_imagedimensions=1
must maybe add the LRC data, under the same conditions of a normal visit (LRC feature is activated, and LRC perf. hints are not available yet in DB for this page), even if nowprocket=1&no_optimize=1 are set.
Acceptance Criteria
-
Manually delete the LRC data of a page to ensure there is no LRC data for this page. Make sure the LRC feature is enabled.
-
Clear the cache and visit the page with
nowprocket=1&no_optimize=1&wpr_imagedimensions=1
. LRC hashes must be added to the page. -
Check the DB, the LRC data must have been stored.
-
Clear the cache again. Visit the same page. LRC hashes must not be injected.
-
Clear performance hints to trigger a warm-up. After a few minutes, LRC data must be available in DB and the rows must contain hashes. There could still be some inconsistencies (but just a few pages, not all). In which case, this is good enough for this issue and it will be followed-up with #6894