drupal_rebuild example

$request->query->get('token') && $request->query->get('timestamp') &&
    (($request->server->getInt('REQUEST_TIME') - $request->query->get('timestamp')) < 300) &&
    hash_equals(Crypt::hmacBase64($request->query->get('timestamp'), Settings::get('hash_salt'))$request->query->get('token'))
  )) {
  // Clear user cache for all major platforms.   $user_caches = [
    'apcu_clear_cache',
    'wincache_ucache_clear',
  ];
  array_map('call_user_func', array_filter($user_caches, 'is_callable'));

  drupal_rebuild($autoloader$request);
  \Drupal::messenger()->addStatus('Cache rebuild complete.');
}
$base_path = dirname($request->getBaseUrl(), 2);
header('Location: ' . $request->getSchemeAndHttpHost() . $base_path);
Home | Imprint | This part of the site doesn't use cookies.