Aggiunto lock cache utenti in retrieveUserData
This commit is contained in:
@@ -155,6 +155,7 @@ public class UserCacheService {
|
||||
public @Nullable UserDTO retrieveUserData(String profileDb, String username, IntegryApplicationEnum application) {
|
||||
String dbName = settingsModel.getDbNameFromProfileDb(profileDb);
|
||||
|
||||
cacheLock.lock();
|
||||
List<UserDTO> users = cachedUsers.getOrDefault(dbName, null);
|
||||
|
||||
if (users == null || users.isEmpty())
|
||||
@@ -168,6 +169,7 @@ public class UserCacheService {
|
||||
(application == IntegryApplicationEnum.WMS && x.isWeb()) ||
|
||||
(application == IntegryApplicationEnum.GESTIONALE_BASE && x.isInternal())))
|
||||
.findFirst();
|
||||
cacheLock.unlock();
|
||||
|
||||
return foundUser.orElse(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user