mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-17 04:24:48 -06:00
Avoid invalidating the realm when managing client initial access
Closes #42922 Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
This commit is contained in:
committed by
GitHub
parent
a8d947b1a9
commit
6b49ffe5ee
@@ -1800,28 +1800,32 @@ public class RealmAdapter implements CachedRealmModel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClientInitialAccessModel createClientInitialAccessModel(int expiration, int count) {
|
public ClientInitialAccessModel createClientInitialAccessModel(int expiration, int count) {
|
||||||
getDelegateForUpdate();
|
// This does not call getDelegateForUpdate() this data is never cached, and calling it would invalidate all cached realm data
|
||||||
return updated.createClientInitialAccessModel(expiration, count);
|
return modelSupplier.get().createClientInitialAccessModel(expiration, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClientInitialAccessModel getClientInitialAccessModel(String id) {
|
public ClientInitialAccessModel getClientInitialAccessModel(String id) {
|
||||||
return getDelegateForUpdate().getClientInitialAccessModel(id);
|
// This does not call getDelegateForUpdate() this data is never cached, and calling it would invalidate all cached realm data
|
||||||
|
return modelSupplier.get().getClientInitialAccessModel(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeClientInitialAccessModel(String id) {
|
public void removeClientInitialAccessModel(String id) {
|
||||||
getDelegateForUpdate().removeClientInitialAccessModel(id);
|
// This does not call getDelegateForUpdate() this data is never cached, and calling it would invalidate all cached realm data
|
||||||
|
modelSupplier.get().removeClientInitialAccessModel(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Stream<ClientInitialAccessModel> getClientInitialAccesses() {
|
public Stream<ClientInitialAccessModel> getClientInitialAccesses() {
|
||||||
return getDelegateForUpdate().getClientInitialAccesses();
|
// This does not call getDelegateForUpdate() this data is never cached, and calling it would invalidate all cached realm data
|
||||||
|
return modelSupplier.get().getClientInitialAccesses();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void decreaseRemainingCount(ClientInitialAccessModel clientInitialAccess) {
|
public void decreaseRemainingCount(ClientInitialAccessModel clientInitialAccess) {
|
||||||
getDelegateForUpdate().decreaseRemainingCount(clientInitialAccess);
|
// This does not call getDelegateForUpdate() this data is never cached, and calling it would invalidate all cached realm data
|
||||||
|
modelSupplier.get().decreaseRemainingCount(clientInitialAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user