-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.yaml
87 lines (81 loc) · 1.61 KB
/
test.yaml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
# hitbox server base settings
server:
host: 127.0.0.1
port: 8080
proto: Http
# map of applications
upstreams:
api:
host: 127.0.0.1
port: 8080
proto: Http
# map of backends
backends:
- type: Redis
host: 127.0.0.1
port: 6379
database: 0
- type: InMemory
max_size: 1Gb
# map of cache policies
policies:
cache_with_lock:
cache: Enabled
lock: Local
stale: Disabled
non_cacheable:
cache: Disabled
# default settings
cache:
ttl: 1min
prefix: api
version: 1
backend: redis
policy: cache_with_lock
upstream: api
# map of groups
groups:
api:
upstream: api
sitemaps:
upstream: api
backend: inmemory
exclude:
upstream: api
policy: non_cacheable
# list of all endpoint
endpoints:
- path: "/clusters/comments/"
request:
query:
page: all
sort_by:
variants:
- date
- clicks
headers:
x-source:
variants:
- ios
x-version:
exclude:
- 1.15
# проверить что по дефолту кешируем - статус ответа + какие хедеры (rfc) + content type?
response:
status_codes:
- 200
headers:
content-type:
variants:
- application/json
if: "cluster.items"
# посмотреть в NGINX как строится ключ кеширования по дефолту (host + path + query)
group: api
ttl: 10min
- path: "/cluster/{cluster_id:i32}/"
group: api
backend: inmemory
- path: "/sitemaps/"
group: sitemaps
...