Skip to content

Commit

Permalink
Switching back to more stable cache key #906
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 17, 2016
1 parent 59bbaa5 commit ac67fb7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions system/src/Grav/Common/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,14 @@ protected function pipelineCss($group = 'head')
// temporary list of assets to pipeline
$temp_css = [];

/** @var Cache $cache */
$cache = Grav::instance()['cache'];

// clear no-pipeline assets lists
$this->css_no_pipeline = [];

// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->css) . $this->css_minify . $this->css_rewrite . $group . time());
$uid = md5(json_encode($this->css) . $this->css_minify . $this->css_rewrite . $group . $cache->getKey());
$file = $uid . '.css';
$inline_file = $uid . '-inline.css';

Expand Down Expand Up @@ -753,11 +756,14 @@ protected function pipelineJs($group = 'head')
// temporary list of assets to pipeline
$temp_js = [];

/** @var Cache $cache */
$cache = Grav::instance()['cache'];

// clear no-pipeline assets lists
$this->js_no_pipeline = [];

// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->js) . $this->js_minify . $group . time());
$uid = md5(json_encode($this->js) . $this->js_minify . $group . $cache->getKey());
$file = $uid . '.js';
$inline_file = $uid . '-inline.js';

Expand Down

0 comments on commit ac67fb7

Please sign in to comment.