Example config found here:
upstream: "https://httpbin.org"
routes:
- path: "/anything/:param1"
clear_cache:
- DELETE
- POST
The service has a catch-all route that proxies ALL requests to the specified upstream.
GET
routes defined in the config.yamL
are cached in memory. The first request is made against upstream and all future ones are served out of memory.
A HEAD
request against the route will clear the cache.
Request methods defined in clear_cache
will also clear it.
Example:
GET /anything/foobar
-> proxied, saved in memoryGET /anything/foobar
-> served from cachePOST /anything/foobar
-> proxied, clears cacheGET /anything/foobar
-> proxied, saved in memory