code: protected void cachePrincipal(String apiKey, Principal principal) {
          cache.put(apiKey, Optional.fromNullable(principal));
      }
docs: Put this principal directly into cache.  This can avoid lookup on
  user request and "prepay" the lookup cost.
  @param apiKey        the api key
  @param principal     the principal