protected Api getApi(String orgId, String apiId, String version) throws IOException {
        String apiIdx = getApiIdx(orgId, apiId, version);
        Api api;
        synchronized (mutex) {
            api = apiCache.get(apiIdx);
        }

        if (api == null) {
            api = super.getApi(getApiId(orgId, apiId, version));
            synchronized (mutex) {
                if (api != null) {
                    apiCache.put(apiIdx, api);
                }
            }
        }

        return api;
    }
Gets the api either from the cache or from ES.
@param orgId
@param apiId
@param version
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/CachingEsRegistry.java