Skip to content

Commit a6513be

Browse files
committed
flush cache after upgrading
1 parent 7db6db3 commit a6513be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

includes/class-plugin.php

+13
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,26 @@ private function __construct() {
8080
$this->screen = 'settings_page_redis-cache';
8181
}
8282

83+
$this->run_migrations();
8384
$this->add_actions_and_filters();
8485

8586
if ( is_admin() && ! wp_next_scheduled( 'rediscache_discard_metrics' ) ) {
8687
wp_schedule_event( time(), 'hourly', 'rediscache_discard_metrics' );
8788
}
8889
}
8990

91+
/**
92+
* Run migrations
93+
*
94+
* @return void
95+
*/
96+
public function run_migrations() {
97+
if ( WP_REDIS_VERSION === '2.0.16' && ! get_option( 'roc_migrated_2_0_16' ) ) {
98+
wp_flush_cache();
99+
update_option( 'roc_migrated_2_0_16', true, true );
100+
}
101+
}
102+
90103
/**
91104
* Adds all necessary hooks
92105
*

0 commit comments

Comments
 (0)