code: public static String getCacheKey(String uniqueId, String appRealm) {
          StringBuilder cacheKey = new StringBuilder();
          if (uniqueId == null || appRealm == null) {
              cacheKey.append(CACHE_KEY_PREFIX);
          } else {
              cacheKey.append(CACHE_KEY_PREFIX).append(uniqueId).append(CACHE_KEY_SEPARATOR).append(appRealm);
          }
          return cacheKey.toString();
      }
docs: This method constructs the cache key that is required by security for caching
  the Subject.
  
  @param uniqueId The unique Id of the user
  @param appRealm The application realm that the user belongs to
  @return the cache key