# Google Auth Library Client - Class HttpClientCache (1.50.1)

1.50.1 (latest) 1.50.0 1.49.0 1.48.1 1.47.1 1.46.0 1.45.2 Reference documentation and code samples for the Google Auth Library Client class HttpClientCache.

Stores an HTTP Client in order to prevent multiple instantiations.

## Namespace

Google \\ Auth \\ HttpHandler

## Methods

### static::setHttpClient

Cache an HTTP Client for later calls.

Passing null will unset the cached client.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `client` | `GuzzleHttp\ClientInterface|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### static::getHttpClient

Get the stored HTTP Client, or null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\ClientInterface|null` |   |