Skip to content

Commit

Permalink
flush cache after upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss committed Sep 29, 2020
1 parent 7db6db3 commit cd37474
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions includes/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,26 @@ private function __construct() {
$this->screen = 'settings_page_redis-cache';
}

$this->run_migrations();
$this->add_actions_and_filters();

if ( is_admin() && ! wp_next_scheduled( 'rediscache_discard_metrics' ) ) {
wp_schedule_event( time(), 'hourly', 'rediscache_discard_metrics' );
}
}

/**
* Run migrations
*
* @return void
*/
public function run_migrations() {
if ( ! get_option( 'roc_migrated_2_0_16' ) ) {
wp_flush_cache();
update_option( 'roc_migrated_2_0_16', true, true );
}
}

/**
* Adds all necessary hooks
*
Expand Down

0 comments on commit cd37474

Please sign in to comment.