Skip to content

Commit

Permalink
fix(theming): make cache buster depend on the app version
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny committed Aug 7, 2024
1 parent fbbc104 commit 8596b91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/theming/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,13 @@ public function getCacheBuster(): string {
if (!is_null($user)) {
$userId = $user->getUID();
}
$themingAppVersion = $this->appManager->getAppVersion('theming');
$userCacheBuster = '';
if ($userId) {
$userCacheBusterValue = (int)$this->config->getUserValue($userId, 'theming', 'userCacheBuster', '0');
$userCacheBuster = $userId . '_' . $userCacheBusterValue;
}
$systemCacheBuster = $this->config->getAppValue('theming', 'cachebuster', '0');
return substr(sha1($userCacheBuster . $systemCacheBuster), 0, 8);
return substr(sha1($themingAppVersion . $userCacheBuster . $systemCacheBuster), 0, 8);
}
}

0 comments on commit 8596b91

Please sign in to comment.