code: @Override
    public Entity findOne(Query<Entity> query) {
      if (transactionInformation.isRepositoryCompletelyClean(getEntityType()) && cacheable) {
        // pageSize is irrelevant for findOne, would be a waste to cache them in different entries
        // sort may affect which of the results is the first result, so cannot ignore that.
        QueryImpl<Entity> cacheKey = new QueryImpl<>(query).setPageSize(1);
        List<Object> ids = l3Cache.get(delegate(), cacheKey);
        if (ids.isEmpty()) {
          return null;
        }
        return delegate().findOneById(ids.get(0), query.getFetch());
      }
      return delegate().findOne(query);
    }
docs: Retrieves a single identifier from the {@link L3Cache} if the {@link Repository} is cacheable
  and hasn't been touched in this transaction.
  
  @param query The {@link Query}
  @return A single {@link Entity} or null if not found