You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/configuration/caching.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,22 @@ User Y will get the cached response from user X's query.
63
63
Since 1.20.0, the cache is specific for each user by default since it's better in terms of security.
64
64
It's possible to use the previous behavior by setting the following property of the cache in the config file `shared_with_all_users = true`
65
65
66
+
#### Temporary file prefix
67
+
68
+
While streaming a ClickHouse response into the cache, chproxy writes it to a temporary file in the OS temp directory. The filename starts with a configurable prefix, which defaults to `chproxyTmp`.
69
+
70
+
Setting a custom prefix is useful when you need to distinguish chproxy temp files from those of other processes, for example in monitoring or cleanup scripts:
71
+
72
+
```yaml
73
+
caches:
74
+
- name: my-cache
75
+
mode: file_system
76
+
tmp_file_prefix: chproxyResponseCache_
77
+
file_system:
78
+
dir: /path/to/cache
79
+
max_size: 100Mb
80
+
```
81
+
66
82
#### Detecting Cache Hits
67
83
68
84
`Chproxy` will respond with an `X-Cache` header with a value of `HIT` if it returned a response from either the local or the distributed cache. Otherwise `X-Cache` will be set to `MISS`.
0 commit comments