From bb3b9f689dd99df66454b93ece34093556dc37f9 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 20 Jun 2024 12:14:01 +1000 Subject: [PATCH] Better support non-WordPress use-cases (#60) This better allows for environments where WordPress functions are not fully loaded. --- object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index 622c1e9..dd2ff80 100644 --- a/object-cache.php +++ b/object-cache.php @@ -477,7 +477,7 @@ function flush() { $this->rotate_site_keys( $flush_number ); - if ( is_main_site() ) { + if ( function_exists( 'is_main_site' ) && is_main_site() ) { $this->rotate_global_keys( $flush_number ); }