-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcache-config.example.yml
25 lines (25 loc) · 1021 Bytes
/
cache-config.example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: '1' # good to have for your own reference
xResponseTime: true
health: true
dummyRest: # namespace
expose: '/api/v1/*' # it will be exposed to you
target: 'http://dummy.restapiexample.com/api/v1' # will get data from here
changeOrigin: true #true/false
cache: # default cache option for above namespace
pool: true # concurrent request will not hit the server in case of cache miss.
expires: 10s # cache will expire in 10 seconds
query: false # changes in querysting will not return diffenent results
headers: false # changes in headers will not return different results
rules:
/employees/: # overriding default cache options
cache:
expires: 1m # cache will last for 1 minute
pool: true # will use request pool
query: # results will be different for below query params
- limit
- page
- alphabet
headers:
- x-locale # results will be different for x-locale header value
/employee/2/:
cache: false