mirror of
https://github.com/google/nomulus.git
synced 2025-06-01 18:18:42 +02:00
Remove Registrar caching from all console actions
Caching turns out to be an anti-pattern for the console. If we use it, changes from the user just get obliterated by the older, cached version the next time the console refreshes (and it happens to refresh after every update). Caching is also not very useful here, as the amount of database access driven by the console is very small. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190650931
This commit is contained in:
parent
6dec95b980
commit
e1ad4d663c
10 changed files with 12 additions and 18 deletions
|
@ -59,8 +59,7 @@ public class SessionUtils {
|
|||
* the registrar console.
|
||||
*/
|
||||
@CheckReturnValue
|
||||
Registrar getRegistrarForAuthResult(
|
||||
HttpServletRequest request, AuthResult authResult, boolean bypassCache) {
|
||||
Registrar getRegistrarForAuthResult(HttpServletRequest request, AuthResult authResult) {
|
||||
if (!authResult.userAuthInfo().isPresent()) {
|
||||
throw new ForbiddenException("Not logged in");
|
||||
}
|
||||
|
@ -69,9 +68,7 @@ public class SessionUtils {
|
|||
}
|
||||
String clientId = getRegistrarClientId(request);
|
||||
return checkArgumentPresent(
|
||||
bypassCache
|
||||
? Registrar.loadByClientId(clientId)
|
||||
: Registrar.loadByClientIdCached(clientId),
|
||||
Registrar.loadByClientId(clientId),
|
||||
"Registrar %s not found",
|
||||
clientId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue