Add getCacheKey() to CurrentUser and its implementations

getCacheKey() can be used when grouping objects by user in caches. The
first user of this new method is a PerThreadCache added in a later commit.

Change-Id: I00a9c1528e2fdd2219f511ba749074efe9d967b6
This commit is contained in:
Patrick Hiesel
2018-04-18 09:59:32 +02:00
parent 8138ae974a
commit 867b2aa941
9 changed files with 43 additions and 1 deletions

View File

@@ -382,6 +382,11 @@ public class IdentifiedUser extends CurrentUser {
return effectiveGroups;
}
@Override
public Object getCacheKey() {
return getAccountId();
}
public PersonIdent newRefLogIdent() {
return newRefLogIdent(new Date(), TimeZone.getDefault());
}