[Documentation](../../README.md) > [GPlayApps](README.md) > **setCache**

# Nelexa\GPlay\GPlayApps::setCache
`Nelexa\GPlay\GPlayApps::setCache` — Sets caching for HTTP requests.

## Description
```php
Nelexa\GPlay\GPlayApps::setCache ( Psr\SimpleCache\CacheInterface | null $cache [, DateInterval | int | null $cacheTtl = null ] ) : Nelexa\GPlay\GPlayApps
```

## Parameters
* **$cache** (Psr\SimpleCache\CacheInterface | null)  
PSR-16 Simple Cache instance
* **$cacheTtl** ([DateInterval](../../https:/www.php.net/manual/class.dateinterval.php) | int | null)  
TTL cached data

## Return Values
returns the current class instance to allow method chaining

[Documentation](../../README.md) > [GPlayApps](README.md) > **setCache**
