code: private CacheLoader<Query<Entity>, List<Object>> createCacheLoader(
        final Repository<Entity> repository) {
      String repositoryName = repository.getName();
      Fetch idAttributeFetch =
          new Fetch().field(repository.getEntityType().getIdAttribute().getName());
      return new CacheLoader<Query<Entity>, List<Object>>() {
        /**
         * Loads {@link Entity} identifiers for a {@link Query}
         *
         * @param query the cache key to load
         * @return {@link List} of identifier {@link Object}s
         */
        @Override
        public List<Object> load(@Nonnull Query<Entity> query) {
          LOG.trace("Loading identifiers from repository {} for query {}", repositoryName, query);
          return repository
              .findAll(new QueryImpl<>(query).fetch(idAttributeFetch))
              .map(Entity::getIdValue)
              .collect(toList());
        }
      };
    }
docs: Create a cacheloader that loads entity ids from the repository and stores them together with
  their query
  
  @return the {@link CacheLoader}