CacheBuster is suboptimal #4567

Closed
halfdan opened this Issue Jan 22, 2014 · 3 comments

3 participants

@halfdan
Piwik Open Source Analytics member

The cache buster is generating a hash from several changing properties:

$pluginList = md5(implode(",", !$pluginNames ? Manager::getInstance()->getLoadedPluginsName() : $pluginNames));
$cacheBuster = md5(SettingsPiwik::getSalt() . $pluginList . PHP_VERSION . Version::VERSION . trim($currentGitHash));

Things to note:

  • md5 is used twice
  • SettingsPiwik::getSalt() is a static value.
@anonymous-piwik-user

In 74e9976: Simplify cache buster and use only values that can change.

fixes #4567

@robocoder

With git, I suppose devs commit more frequently. But just for historical context, I included the salt because I would frequently erase my config and re-install from my workspace without committing anything to svn.

@halfdan
Piwik Open Source Analytics member

Makes sense - but changing the salt wouldn't have any effect on the assets/cache.

@halfdan halfdan added this to the 2.1 - Piwik 2.1 milestone Jul 8, 2014
@halfdan halfdan self-assigned this Jul 8, 2014
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@halfdan halfdan Simplify cache buster and use only values that can change.
fixes #4567
74e9976
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment