function FileCache::isEmpty

8.0.x FileCache.php FileCache::isEmpty()
7.x FileCache.php FileCache::isEmpty()
master FileCache.php FileCache::isEmpty()

Check if a cache bin is empty.

A cache bin is considered empty if it does not contain any valid data for any cache ID.

Return value

TRUE if the cache bin specified is empty.

Overrides CacheInterface::isEmpty

File

lib/Drush/Cache/FileCache.php, line 139
Definition of Drush\Cache\FileCache.

Namespace

Drush\Cache

Class

FileCache
Default cache implementation.

Code

function isEmpty() {
  $files = drush_scan_directory($this->directory, "//", array('.', '..'));
  return empty($files);
}