NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Interface CacheStorageInterface

Interface used to cache HTTP requests

### Direct known implementers

`Guzzle\Plugin\Cache\DefaultCacheStorage`

Namespace: Guzzle\Plugin\Cache
Located at Guzzle/Plugin/Cache/CacheStorageInterface.php

## Methods summary

- `public` `fetch ( Guzzle\Http\Message\RequestInterface $request )`

  Get a Response from the cache for a request

- `public` `cache ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response )`

  Cache an HTTP request

- `public` `delete ( Guzzle\Http\Message\RequestInterface $request )`

  Deletes cache entries that match a request

- `public` `purge ( string $url )`

  Purge all cache entries for a given URL

## Methods detail

# `public null|`Guzzle\Http\Message\Response``
`fetch( `Guzzle\Http\Message\RequestInterface` $request )`

Get a Response from the cache for a request

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request

#### Returns

`null|`Guzzle\Http\Message\Response``
# `public`
`cache( `Guzzle\Http\Message\RequestInterface` $request, `Guzzle\Http\Message\Response` $response )`

Cache an HTTP request

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request being cached
$response
  ``Guzzle\Http\Message\Response``
  $response Response to cache

# `public`
`delete( `Guzzle\Http\Message\RequestInterface` $request )`

Deletes cache entries that match a request

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Request to delete from cache

# `public`
`purge( string $url )`

Purge all cache entries for a given URL

#### Parameters

$url
  `string`
  $url

### Magic methods summary