Invalidate cache before loadData() (2.1.1.2)

This commit is contained in:
Tobias Eidelpes 2021-04-28 17:00:17 +02:00
parent 516092c3f4
commit f3f8bcfcac

View File

@ -84,6 +84,7 @@ public class CachingAuthenticationService implements ICachingAuthenticationServi
@PostConstruct
@Override
public void loadData() {
clearCache();
for (IRider rider : daoFactory.createRiderDAO().findAll()) {
userCache.putIfAbsent(rider.getEmail(), rider.getPassword());
}
@ -92,6 +93,7 @@ public class CachingAuthenticationService implements ICachingAuthenticationServi
@Override
public void clearCache() {
userCache.clear();
tokenCache.clear();
}
private byte[] generateSHA1(String string) {