@Deprecated
    private static String buildCacheID(ApiRequest request, CachingConfig config) {
        StringBuilder cacheId = new StringBuilder();
        if (request.getContract() != null) {
            cacheId.append(request.getApiKey());
        } else {
            cacheId.append(request.getApiOrgId()).append(KEY_SEPARATOR).append(request.getApiId())
                    .append(KEY_SEPARATOR).append(request.getApiVersion());
        }
        cacheId.append(KEY_SEPARATOR).append(request.getType()).append(KEY_SEPARATOR)
                .append(request.getDestination());

        // According to RFC7234 (https://tools.ietf.org/html/rfc7234#section-2),
        // 'The primary cache key consists of the request method and target URI.'
        // For historical reasons, this is not the behaviour of this policy, which instead
        // uses only the path part of the URI, not the query string.
        // The behaviour mentioned in the RFC can be enabled using a configuration option.
        if (config.isIncludeQueryInKey() && !request.getQueryParams().isEmpty()) {
            cacheId.append("?").append(request.getQueryParams().toQueryString());
        }

        return cacheId.toString();
    }
Builds a cached request id composed by the API key followed by the HTTP
verb and the destination. In the case where there's no API key the ID
will contain ApiOrgId + ApiId + ApiVersion
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/CachingPolicy.java