You are here

public function CacheflushApi::clearBinCache in CacheFlush 8

Clear cache by service id.

Parameters

string $service_id: Name of cache service.

string $function: Function to be called.

string $cid: Cache ID.

File

src/Controller/CacheflushApi.php, line 159

Class

CacheflushApi
Returns responses for Cacheflush routes.

Namespace

Drupal\cacheflush\Controller

Code

public function clearBinCache($service_id, $function = 'deleteAll', $cid = NULL) {
  $this->container
    ->get($service_id)
    ->{$function}($cid);
}