You are here

public function CacheflushApi::clearStorageCache in CacheFlush 8

Clear cache by service id.

Parameters

string $type: The name for which the storage should be returned. Defaults to 'default' The name is also used as the storage bin if one is not specified in the configuration.

string $function: Function to be called.

File

src/Controller/CacheflushApi.php, line 173

Class

CacheflushApi
Returns responses for Cacheflush routes.

Namespace

Drupal\cacheflush\Controller

Code

public function clearStorageCache($type, $function = 'deleteAll') {
  PhpStorageFactory::get($type)
    ->{$function}();
}