From fe2755778d65b4a964716b39f729c09783050362 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 25 Sep 2024 16:26:27 -0400 Subject: [PATCH] Include headers --- src/mantle/http-client/class-cache-middleware.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mantle/http-client/class-cache-middleware.php b/src/mantle/http-client/class-cache-middleware.php index 3c3e6fdd..41ebfa69 100644 --- a/src/mantle/http-client/class-cache-middleware.php +++ b/src/mantle/http-client/class-cache-middleware.php @@ -37,8 +37,7 @@ public function __construct( protected mixed $ttl ) {} */ public function __invoke( Pending_Request $request, Closure $next ): Response { $cache_key = $this->get_cache_key( $request ); - - $cache = wp_cache_get( $cache_key, self::CACHE_GROUP ); + $cache = wp_cache_get( $cache_key, self::CACHE_GROUP ); if ( $cache && $cache instanceof Response ) { return $cache; @@ -71,6 +70,7 @@ protected function get_cache_key( Pending_Request $request ): string { $request->url(), $request->method(), $request->body(), + $request->headers(), ] ) ); }