code: protected Integer getKeyHash(final Map<String, Object> seed) {
          //Determine the attributes to build the cache key with
          final Set<String> cacheAttributes;
          if (this.useAllAttributes) {
              cacheAttributes = seed.keySet();
          } else if (this.cacheKeyAttributes != null) {
              cacheAttributes = this.cacheKeyAttributes;
          } else {
              cacheAttributes = this.defaultAttributeNameSet;
          }
  
          //Build the cache key based on the attribute Set
          final HashMap<String, Object> cacheKey = new HashMap<>(cacheAttributes.size());
          for (final String attr : cacheAttributes) {
              if (seed.containsKey(attr)) {
                  final Object value = seed.get(attr);
  
                  if (!this.ignoreEmptyAttributes) {
                      cacheKey.put(attr, value);
                  } else if (value instanceof Collection) {
                      if (!CollectionUtils.isEmpty((Collection<?>) value)) {
                          cacheKey.put(attr, value);
                      }
                  } else if (value instanceof String) {
                      if (StringUtils.isNotEmpty((String) value)) {
                          cacheKey.put(attr, value);
                      }
                  } else if (value != null) {
                      cacheKey.put(attr, value);
                  }
              }
          }
  
          if (this.logger.isDebugEnabled()) {
              this.logger.debug("Generated cache Map " + cacheKey + " from seed Map " + seed);
          }
  
          //If no entries don't return a key
          if (cacheKey.isEmpty()) {
              return null;
          }
  
          //Return the key map's hash code
          return cacheKey.hashCode();
      }
docs: Gets the hash of the key elements from the seed {@link Map}. The key elements are specified by
  the <code>cacheKeyAttributes</code> {@link Set} or if it is <code>null</code> the
  <code>defaultAttributeName</code> is used as the key attribute.
  
  @param seed Seed
  @return Hash of key elements from the seed