Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheBuster is suboptimal #4567

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

CacheBuster is suboptimal #4567

halfdan opened this issue Jan 22, 2014 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@halfdan
Copy link
Member

halfdan commented Jan 22, 2014

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-matomo-user
Copy link

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

fixes #4567

@robocoder
Copy link
Contributor

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
Copy link
Member Author

halfdan commented Jan 22, 2014

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 pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants