Tree Gateway - Cache

Cache

Cache Example --- name: MyCachedAPI version: 1.0.0 path: cached/ proxy: target: host: http://httpbin.org cache: client: cacheTime: 1 minute server: cacheTime: 10 minutes binary: true preserveHeaders: access-control-allow-credentials

This sample uses a cache configuration to the target API. We are configuring here two types of cache:

The client cache will have a lifetime of 1 minute and the server cache 10 minutes.

The server cache will store a binary content and also the content of the response header 'access-control-allow-credentials'.