Hello @dependencyinjection ,
I’m glad to hear that you’re happy with our Speed Optimizer plugin!
You can set a custom clean-up interval for the File-based caching by using the add_filter function. The clean-up interval value is stored in an option called siteground_optimizer_file_caching_interval_cleanup, and to change it, you can insert a snippet like the following one into the active theme’s functions.php file (or a plugin that is used to insert custom code into the site):
add_filter('option_siteground_optimizer_file_caching_interval_cleanup', function($value) {
return YOUR_CUSTOM_INTERVAL_IN_SECONDS;
});
The value is stored in seconds – for example, if you wish to set it to 1 hour, the snippet would look like this:
add_filter('option_siteground_optimizer_file_caching_interval_cleanup', function($value) {
return 3600;
});
Best Regards,
Svetoslav Vasev
Hi Svetoslav, that’s amazing, thank you for the quick reply!
Did it like this to make it 4 hours:
add_filter(‘option_siteground_optimizer_file_caching_interval_cleanup’, function($value) { return 4 * HOUR_IN_SECONDS; });