コード例 #1
0
  private AuthGroups checkGroupCache(AuthToken token) {
    if (grpCache == null) {
      return null;
    }

    return grpCache.getUserGroup(getGroupCacheKey(token));
  }
コード例 #2
0
  private void cacheGroupInfo(AuthToken token, AuthGroups groups) {
    if (groups == null || grpCache == null) {
      return;
    }

    try {
      grpCache.storeGroups(getGroupCacheKey(token), groups, safeGroupTtl());
    } catch (IOException ex) {
      LOG.warn(
          "Unable to cache user group information: " + token + " Reason: " + ex.getMessage(), ex);
    }
  }