osiam
osiam copied to clipboard
Cache client details per request
Moved from https://github.com/osiam/auth-server/issues/67:
@tkrille:
I've noticed that 1 request to an OAuth-protected resource on the resource server leads to several roundtrips to the client database. Seems that Spring Security OAuth calls clientDetailsService.loadClientByClientId(clientId)
for almost every single attribute it has to know about. We should somehow cache the result of clientDetailsService.loadClientByClientId(clientId)
on a per request basis.