Instantiates and statically caches the correct class for a cache bin.
By default, this returns an instance of the Drupal\Core\Cache\DatabaseBackend class.
Classes implementing Drupal\Core\Cache\CacheBackendInterface can register themselves both as a default implementation and for specific bins.
$bin: The cache bin for which the cache object should be returned, defaults to 'cache'.
Drupal\Core\Cache\CacheBackendInterface The cache object associated with the specified bin.
Drupal\Core\Cache\CacheBackendInterface
function cache($bin = 'cache') {
return Drupal::cache($bin);
}