1.20.x cache.inc cache_is_empty(string $bin)

Checks if a cache bin is empty.

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

Parameters

string $bin: The cache bin to check.

Return value

TRUE if the cache bin specified is empty.:

File

includes/cache.inc, line 207
Functions and interfaces for cache handling.

Code

function cache_is_empty(string $bin) {
  return cache($bin)->isEmpty();
}