diff --git a/includes/class-plugin.php b/includes/class-plugin.php index 27b21042..ddfba7d2 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -80,6 +80,7 @@ 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' ) ) { @@ -87,6 +88,18 @@ private function __construct() { } } + /** + * 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 *