Skip to content

Instantly share code, notes, and snippets.

@dawehner
Created September 7, 2016 09:38
Show Gist options
  • Select an option

  • Save dawehner/c6b10797562d0561e7d6de5d23ac57b1 to your computer and use it in GitHub Desktop.

Select an option

Save dawehner/c6b10797562d0561e7d6de5d23ac57b1 to your computer and use it in GitHub Desktop.
diff --git a/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php b/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
index 869abe3..d17e0f3 100644
--- a/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
+++ b/docroot/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php
@@ -80,7 +80,10 @@ class CssCollectionRenderer implements AssetCollectionRendererInterface {
// browser-caching. The string changes on every update or full cache
// flush, forcing browsers to load a new copy of the files, as the
// URL changed.
- $query_string = $this->state->get('system.css_js_query_string') ?: '0';
+ if (($query_string = $this->state->get('system.css_js_query_string', NULL)) && $query_string === NULL) {
+ $query_string = base_convert(REQUEST_TIME, 10, 36);
+ $this->state->set('system.css_js_query_string', $query_string);
+ }
// Defaults for LINK and STYLE elements.
$link_element_defaults = array(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment