diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 4da755339..0797428f7 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -277,7 +277,7 @@ public function save( int $user_id, string $status, int $anonymous = 0, int $gue 'anonymous' => intval( $anonymous ), ); - wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ) ); + wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ), '' ); if ( ! $limit_reached ) { $this->check_waiting_list(); @@ -383,7 +383,7 @@ public function attending_limit_reached( array $current_response, int $guests = public function responses(): array { $post_id = $this->event->ID; $cache_key = sprintf( self::CACHE_KEY, $post_id ); - $retval = wp_cache_get( $cache_key ); + $retval = wp_cache_get( $cache_key, '' ); $rsvp_query = Rsvp_Query::get_instance(); // @todo add testing with cache. @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, '', 15 * MINUTE_IN_SECONDS ); return $retval; }