Skip to content

Commit

Permalink
Include headers
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Sep 25, 2024
1 parent 30d8bb4 commit fe27557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mantle/http-client/class-cache-middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -71,6 +70,7 @@ protected function get_cache_key( Pending_Request $request ): string {
$request->url(),
$request->method(),
$request->body(),
$request->headers(),
] ) );
}

Expand Down

0 comments on commit fe27557

Please sign in to comment.