code: private LoadingCache<Object, Optional<Map<String, Object>>> createEntityCache(
        Repository<Entity> repository) {
      Caffeine<Object, Object> cacheBuilder =
          Caffeine.newBuilder().recordStats().expireAfterAccess(10, MINUTES);
      if (!MetaDataService.isMetaEntityType(repository.getEntityType())) {
        cacheBuilder.maximumSize(MAX_CACHE_SIZE_PER_ENTITY);
      }
      LoadingCache<Object, Optional<Map<String, Object>>> cache =
          CaffeinatedGuava.build(cacheBuilder, createCacheLoader(repository));
      GuavaCacheMetrics.monitor(meterRegistry, cache, "l2." + repository.getEntityType().getId());
      return cache;
    }
docs: Creates a new Entity cache
  
  @param repository the {@link Repository} to load the entities from
  @return newly created LoadingCache