@Override
  public List<String> getAllIndexedSpaceKeys() throws Exception {
    if (allIndexedSpacesKeys == null
        || allIndexedSpacesKeysNextRefresh < System.currentTimeMillis()) {
      allIndexedSpacesKeys = remoteSystemClient.getAllSpaces();
      if (spaceKeysExcluded != null) {
        allIndexedSpacesKeys.removeAll(spaceKeysExcluded);
      }
      allIndexedSpacesKeysNextRefresh = System.currentTimeMillis() + SPACES_REFRESH_TIME;
    }

    return allIndexedSpacesKeys;
  }