You are here

public function TokenCacheController::flush in Token 8

Clear caches and redirect back to the frontpage.

1 string reference to 'TokenCacheController::flush'
token.routing.yml in ./token.routing.yml
token.routing.yml

File

src/Controller/TokenCacheController.php, line 15

Class

TokenCacheController
Clears cache for tokens.

Namespace

Drupal\token\Controller

Code

public function flush() {
  token_clear_cache();
  $this
    ->messenger()
    ->addMessage($this
    ->t('Token registry caches cleared.'));
  return $this
    ->redirect('<front>');
}