public function StreamWrapperConfiguration::setCacheLifetime in AmazonS3 7.2
Set the cache expiration.
This method must only be called if caching is enabled. Use CACHE_PERMANENT to cache with no expiration.
Parameters
int $expiration:
File
- src/
StreamWrapperConfiguration.php, line 347
Class
- StreamWrapperConfiguration
- Class to manage S3 stream wrapper configuration.
Namespace
Drupal\amazons3Code
public function setCacheLifetime($expiration) {
if (!$this
->isCaching()) {
throw new \LogicException('Caching must be enabled before setting a expiration.');
}
$this->data['expiration'] = $expiration;
}