Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('template_redirect', function(){
- if (isset($_GET['reset-warmup']) && $_GET['reset-warmup'] == 'a3ef456de32e' && class_exists('Swift_Performance_Cache')){
- global $wpdb;
- $wpdb->query('DROP TABLE IF EXISTS ' . SWIFT_PERFORMANCE_TABLE_PREFIX . 'warmup');
- delete_option(SWIFT_PERFORMANCE_TABLE_PREFIX . 'db_version');
- delete_transient('swift_performance_initial_prebuild_links');
- Swift_Performance::db_install();
- Swift_Performance_Cache::clear_all_cache();
- Swift_Performance::get_prebuild_urls();
- }
- });
- // Set a real cronjob: curl "https://yoursite.com/?clear-cache=a3ef456de32e"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement