code: private void removeEntryFromAuthCacheForUser(HttpServletRequest req, HttpServletResponse res) {
          getAuthCacheService();
          if (authCacheService == null) {
              return;
          }
          String user = req.getRemoteUser();
          if (user == null) {
              Principal p = req.getUserPrincipal();
              if (p != null)
                  user = p.getName();
          }
          if (user != null) {
              if (collabUtils != null) {
                  String realm = collabUtils.getUserRegistryRealm(securityServiceRef);
                  if (!user.contains(realm + ":")) {
                      user = realm + ":" + user;
                  }
              }
              authCacheService.remove(user);
          }
      }
docs: Remove entries in the authentication cache using the user as a key
  
  @param req
  @param res