code: private List<PatternCacheControl> buildPatternsList(ServiceProperties properties) {
          Map<String, PatternCacheControl> patterns = new LinkedHashMap<>();
          List<ServiceProperties> locationsList = properties.getNested("location");
          if (locationsList != null && locationsList.size() != 0) {
              for (ServiceProperties location : locationsList) {
                  String directiveList = location.get("cache-control");
                  String[] patternList = location.get("patterns").split("\\s+");
                  for (String pattern : patternList) {
                      patterns.put(pattern, new PatternCacheControl(pattern, directiveList));
                  }
              }
              resolvePatternSpecificity(patterns);
              return sortByMatchingPatternCount(patterns);
          }
          return new ArrayList<>(patterns.values());
      }
docs: Creates the list of PatternCacheControl objects
  @param properties - list of ServiceProperties from the configuration file
  @return a list of PatternCacheControl objects