function AssetQueryString::reset

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Asset/AssetQueryString.php \Drupal\Core\Asset\AssetQueryString::reset()

Resets the cache query string added to all CSS and JavaScript URLs.

Changing the cache query string appended to CSS and JavaScript URLs forces all browsers to fetch fresh files.

Overrides AssetQueryStringInterface::reset

File

core/lib/Drupal/Core/Asset/AssetQueryString.php, line 39

Class

AssetQueryString
Stores a cache busting query string service for asset URLs.

Namespace

Drupal\Core\Asset

Code

public function reset() : void {
  // The timestamp is converted to base 36 in order to make it more compact.
  $this->state
    ->set(self::STATE_KEY, base_convert(strval($this->time
    ->getRequestTime()), 10, 36));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.