You are here

public function CacheItemBackend::has in Flysystem 8

Same name and namespace in other branches
  1. 3.x src/Flysystem/Adapter/CacheItemBackend.php \Drupal\flysystem\Flysystem\Adapter\CacheItemBackend::has()
  2. 2.0.x src/Flysystem/Adapter/CacheItemBackend.php \Drupal\flysystem\Flysystem\Adapter\CacheItemBackend::has()
  3. 3.0.x src/Flysystem/Adapter/CacheItemBackend.php \Drupal\flysystem\Flysystem\Adapter\CacheItemBackend::has()

Returns whether the cache item exists.

Parameters

string $path: The path of the cache item.

Return value

bool True if the item exists, false if not.

File

src/Flysystem/Adapter/CacheItemBackend.php, line 51

Class

CacheItemBackend
Storage backend for cache items.

Namespace

Drupal\flysystem\Flysystem\Adapter

Code

public function has($path) {
  return (bool) $this->cacheBackend
    ->get($this
    ->getCacheKey($path));
}