code: public static <K, V> Optional<CaffeineConfiguration<K, V>> from(Config config, String cacheName) {
      CaffeineConfiguration<K, V> configuration = null;
      try {
        if (config.hasPath("caffeine.jcache." + cacheName)) {
          configuration = new Configurator<K, V>(config, cacheName).configure();
        }
      } catch (ConfigException.BadPath e) {
        logger.log(Level.WARNING, "Failed to load cache configuration", e);
      }
      return Optional.ofNullable(configuration);
    }
docs: Retrieves the cache's settings from the configuration resource if defined.
  
  @param config the configuration resource
  @param cacheName the name of the cache
  @param <K> the type of keys maintained the cache
  @param <V> the type of cached values
  @return the configuration for the cache