You are here

public function AwsCacheAdapter::set in Flysystem - S3 2.0.x

Same name and namespace in other branches
  1. 8 src/AwsCacheAdapter.php \Drupal\flysystem_s3\AwsCacheAdapter::set()

File

src/AwsCacheAdapter.php, line 53

Class

AwsCacheAdapter
A Drupal cache adapter for use with the AWS PHP SDK.

Namespace

Drupal\flysystem_s3

Code

public function set($key, $value, $ttl = 0) {
  $ttl = (int) $ttl;
  $ttl = $ttl === 0 ? CacheBackendInterface::CACHE_PERMANENT : time() + $ttl;
  $this->cache
    ->set($this->prefix . $key, $value, $ttl);
}