Skip to content

Commit

Permalink
Simplify cache buster and use only values that can change.
Browse files Browse the repository at this point in the history
fixes #4567
  • Loading branch information
halfdan committed Jan 22, 2014
1 parent 4d835a1 commit 74e9976
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/AssetManager/UIAssetCacheBuster.php
Expand Up @@ -12,7 +12,6 @@
namespace Piwik\AssetManager;

use Piwik\Plugin\Manager;
use Piwik\SettingsPiwik;
use Piwik\Singleton;
use Piwik\Version;

Expand All @@ -32,8 +31,8 @@ public function piwikVersionBasedCacheBuster($pluginNames = false)
{
$masterFile = PIWIK_INCLUDE_PATH . '/.git/refs/heads/master';
$currentGitHash = file_exists($masterFile) ? @file_get_contents($masterFile) : null;
$pluginList = md5(implode(",", !$pluginNames ? Manager::getInstance()->getLoadedPluginsName() : $pluginNames));
$cacheBuster = md5(SettingsPiwik::getSalt() . $pluginList . PHP_VERSION . Version::VERSION . trim($currentGitHash));
$pluginList = implode(",", !$pluginNames ? Manager::getInstance()->getLoadedPluginsName() : $pluginNames);
$cacheBuster = md5($pluginList . PHP_VERSION . Version::VERSION . trim($currentGitHash));
return $cacheBuster;
}

Expand Down

0 comments on commit 74e9976

Please sign in to comment.