Garbage collection time window for URL Metrics posts could be increased and made customizable #1948
Labels
[Plugin] Optimization Detective
Issues for the Optimization Detective plugin
[Type] Enhancement
A suggestion for improvement of an existing feature
Milestone
When considering that a URL Metric can have an indefinite freshness TTL (#1940), where freshness then depends exclusively on the ETag, I think we should consider increasing the garbage collection time window to be greater than 1 month for
od_url_metrics
posts that haven't been updated:performance/plugins/optimization-detective/storage/class-od-url-metrics-post-type.php
Lines 295 to 319 in 69b7a14
Consider sites that get very little traffic. Just because a page doesn't get visited once a month shouldn't result in the URL Metrics being purged. Maybe something like 3 months or 6 months would be more reasonable for the long tail of sites without much traffic.
The garbage collection TTL should probably have a filter to allow it to be customized (or disabled).
Note that if someone deletes a post there is no logic to attempt to delete any corresponding
od_url_metrics
posts, since there is no connection between the two. I don't think this is necessarily needed.Docs will also need to be updated here:
performance/plugins/optimization-detective/docs/introduction.md
Line 189 in 69b7a14
The text was updated successfully, but these errors were encountered: