@Override
    public <T> void put(String cacheKey, T jsonObject, long timeToLive) throws IOException {
        CacheEntry entry = new CacheEntry();
        entry.setData(null);
        entry.setExpiresOn(System.currentTimeMillis() + (timeToLive * 1000));
        entry.setHead(JSON_MAPPER.writeValueAsString(entry));

        IndexRequest indexRequest = new IndexRequest(getFullIndexName()).source(JSON_MAPPER.writeValueAsBytes(entry), XContentType.JSON).id(cacheKey);
        try {
            getClient().index(indexRequest, RequestOptions.DEFAULT);
        } catch (Throwable e) {
            LOGGER.error(e, "Unable to cache entry at {0}. This should be non-fatal.", cacheKey);
        }
    }
@see io.apiman.gateway.engine.components.ICacheStoreComponent#put(java.lang.String, java.lang.Object, long)
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/EsCacheStoreComponent.java