You are here

public function CacheflushApi::clearAll in CacheFlush 8

Clear all caches.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse Redirect path.

See also

drupal_flush_all_caches()

1 string reference to 'CacheflushApi::clearAll'
cacheflush.routing.yml in ./cacheflush.routing.yml
cacheflush.routing.yml

File

src/Controller/CacheflushApi.php, line 63

Class

CacheflushApi
Returns responses for Cacheflush routes.

Namespace

Drupal\cacheflush\Controller

Code

public function clearAll() {
  drupal_flush_all_caches();
  $this->messenger
    ->addMessage($this
    ->t('Cache cleared.'));
  return $this
    ->redirectUrl();
}