Include user id in cache key

Fixes #1740
This commit is contained in:
Samuel Georges 2016-02-20 09:39:18 +11:00
parent 49d56480b8
commit 95f4be8b68
1 changed files with 3 additions and 1 deletions

View File

@ -109,6 +109,8 @@ class UserPreferencesModel extends SettingsModel
*/
protected function getCacheKey()
{
return 'backend::userpreferences.'.$this->recordCode;
$item = UserPreferences::forUser();
$userId = $item->userContext ? $item->userContext->id : 0;
return $this->recordCode.'-userpreference-'.$userId;
}
}