Change cron from hourly
to twicedaily
fixes #1242
#1246
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on: https://core.trac.wordpress.org/ticket/44370
Many of the suggestions in the WP trac ticket seem non trivial to carry out. Performance implications seem exaggerated.
Downloads are direct links. Clicking on them doesn't trigger any action. The whole mechanism is actually sort of insecure. It relies on obfuscation. Unless we check Nginx logs we can't know when a user has downloaded.
The function that does all the work. the alleged performance hog, is
wp_privacy_delete_old_export_files
. This function scans a dir and deletes files that are older than 3 days. The 3 days corresponds to the text sent in an email. The amount of days can be filtered bywp_privacy_export_expiration
, but I guess my point is we can't change anything except when files get deleted. The cron job still needs to run.Since there isn't anything except personal data files in exports
./wp-personal-data-exports/
I don't actually think this will cause significant performance problems?I've changed the cron job from
hourly
totwicedaily
which should good enough to solve "runs too much" IMHO.