class CacheUtil {

    public static String getKey(Map<String, String> tags) {
        List<String> listOfEntries = tags.entrySet()
                .stream()
                .map(entry -> {
                    String encodedValue = Base64.getEncoder().encodeToString(entry.getValue().getBytes());
                    return entry.getKey() + CACHE_KEY_DELIMITER + encodedValue;
                })
                .sorted()
                .collect(Collectors.toList());
        return String.join(",", listOfEntries);
    }

}