-
Notifications
You must be signed in to change notification settings - Fork 220
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
Do not add URLs to the wpr_rocket_cache table if Preload is disabled #6278
Labels
module: preload
priority: medium
Issues which are important, but no one will go out of business.
type: enhancement
Improvements that slightly enhance existing functionality and are fast to implement
Milestone
Comments
viobru
changed the title
Do not add URLS to the wpr_rocket_cache table if Preload is disabled
Do not add URLs to the wpr_rocket_cache table if Preload is disabled
Nov 21, 2023
piotrbak
added
type: enhancement
Improvements that slightly enhance existing functionality and are fast to implement
module: preload
priority: low
Issues that can wait
priority: medium
Issues which are important, but no one will go out of business.
and removed
priority: low
Issues that can wait
labels
Dec 3, 2023
Reproduce the problemTo reproduce the issue, follow the described steps in the issue. Identify the root causeThe issue is that we are not checking if the manual preload is wp-rocket/inc/Engine/Preload/Subscriber.php Lines 449 to 457 in 4c024ba
Scope a solutionTo solve the issue, we could add this: $request_uri = filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_URL );
if( (bool) !get_rocket_option( 'manual_preload', true ) ) {
// add the currently visited URL to the exclusions array
$regexes[] = $request_uri;
} to the mentioned function. Effort estimation:S Is a refactor needed in that part of the codebase?No |
Miraeld
added a commit
that referenced
this issue
Dec 5, 2023
8 tasks
Miraeld
added a commit
that referenced
this issue
Dec 6, 2023
github-merge-queue bot
pushed a commit
that referenced
this issue
Dec 29, 2023
…d is disabled (#6305) Co-authored-by: Rémy Perona <[email protected]>
Merged
wordpressfan
pushed a commit
that referenced
this issue
Mar 15, 2024
…d is disabled (#6305) Co-authored-by: Rémy Perona <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: preload
priority: medium
Issues which are important, but no one will go out of business.
type: enhancement
Improvements that slightly enhance existing functionality and are fast to implement
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
Currently, any URL that is visited by a real user is added to the
wpr_rocket_cache
table and automatically assigned a “Complete” status even when the Preload is disabled. This causes the DB to grow too large in some cases.To Reproduce
Steps to reproduce the behavior:
wpr_rocket_cache
table in the DB and you'll find those visited URLs added to it with a "Complete" statusExpected behavior
The table itself is not necessary for the caching process to run effectively, so no URLs should be added to it when the Preload is disabled.
Temporary fix - The snippet below will prevent all URLs from being added to the table if the preload is disabled:
Screenshots
N/A
Additional context
HS ticket: https://secure.helpscout.net/conversation/2405513676/451397/
Slack thread: https://wp-media.slack.com/archives/C08N8J6VC/p1698938940269529
Acceptance Criteria (for WP Media team use only)
The text was updated successfully, but these errors were encountered: