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: README.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,6 @@ This is a distributed HTTP cache module for Caddy based on [Souin](https://githu
15
15
Using the minimal configuration the responses will be cached for `120s`
16
16
```caddy
17
17
{
18
-
order cache before rewrite
19
18
cache
20
19
}
21
20
@@ -29,7 +28,6 @@ example.com {
29
28
Here are all the available options for the global options
30
29
```caddy
31
30
{
32
-
order cache before rewrite
33
31
log {
34
32
level debug
35
33
}
@@ -324,9 +322,24 @@ redis-configuration.com {
324
322
cache {
325
323
redis {
326
324
configuration {
327
-
ClientName souin-redis
328
-
InitAddress 127.0.0.1:6379
329
-
SelectDB 0
325
+
Network my-network
326
+
Addr 127.0.0.1:6379
327
+
Username user
328
+
Password password
329
+
DB 1
330
+
MaxRetries 1
331
+
MinRetryBackoff 5s
332
+
MaxRetryBackoff 5s
333
+
DialTimeout 5s
334
+
ReadTimeout 5s
335
+
WriteTimeout 5s
336
+
PoolFIFO true
337
+
PoolSize 99999
338
+
PoolTimeout 10s
339
+
MinIdleConns 100
340
+
MaxIdleConns 100
341
+
ConnMaxIdleTime 5s
342
+
ConnMaxLifetime 5s
330
343
}
331
344
}
332
345
}
@@ -370,8 +383,12 @@ What does these directives mean?
370
383
|`key.disable_host`| Disable the host part in the key |`true`<br/><br/>`(default: false)`|
371
384
|`key.disable_method`| Disable the method part in the key |`true`<br/><br/>`(default: false)`|
372
385
|`key.disable_query`| Disable the query string part in the key |`true`<br/><br/>`(default: false)`|
386
+
|`key.disable_scheme`| Disable the scheme string part in the key |`true`<br/><br/>`(default: false)`|
387
+
|`key.hash`| Hash the key before store it in the storage to get smaller keys |`true`<br/><br/>`(default: false)`|
373
388
|`key.headers`| Add headers to the key matching the regexp |`Authorization Content-Type X-Additional-Header`|
374
389
|`key.hide`| Prevent the key from being exposed in the `Cache-Status` HTTP response header |`true`<br/><br/>`(default: false)`|
390
+
|`key.template`| Use caddy templates to create the key (when this option is enabled, disable_* directives are skipped) |`KEY-{http.request.uri.path}-{http.request.uri.query}`|
391
+
|`max_cacheable_body_bytes`| Set the maximum size (in bytes) for a response body to be cached (unlimited if omited) |`1048576` (1MB) |
375
392
|`mode`| Bypass the RFC respect | One of `bypass``bypass_request``bypass_response``strict` (default `strict`) |
376
393
|`nuts`| Configure the Nuts cache storage ||
377
394
|`nuts.path`| Set the Nuts file path storage |`/anywhere/nuts/storage`|
@@ -381,11 +398,15 @@ What does these directives mean?
381
398
|`olric`| Configure the Olric cache storage ||
382
399
|`olric.path`| Configure Olric with a file |`/anywhere/olric_configuration.json`|
383
400
|`olric.configuration`| Configure Olric directly in the Caddyfile or your JSON caddy configuration |[See the Olric configuration for the options](https://github.com/buraksezer/olric/blob/master/cmd/olricd/olricd.yaml/)|
401
+
|`otter`| Configure the Otter cache storage ||
402
+
|`otter.configuration`| Configure Otter directly in the Caddyfile or your JSON caddy configuration ||
403
+
|`otter.configuration.size`| Set the size of the pool in Otter |`999999` (default `10000`) |
384
404
|`redis`| Configure the Redis cache storage ||
385
405
|`redis.url`| Set the Redis url storage |`localhost:6379`|
386
406
|`redis.configuration`| Configure Redis directly in the Caddyfile or your JSON caddy configuration |[See the Nuts configuration for the options](https://github.com/nutsdb/nutsdb#default-options)|
387
407
|`regex.exclude`| The regex used to prevent paths being cached |`^[A-z]+.*$`|
388
408
|`stale`| The stale duration |`25m`|
409
+
|`storers`| Storers chain to fallback if a previous one is unreachable or don't have the resource |`otter nuts badger redis`|
389
410
|`timeout`| The timeout configuration ||
390
411
|`timeout.backend`| The timeout duration to consider the backend as unreachable |`10s`|
391
412
|`timeout.cache`| The timeout duration to consider the cache provider as unreachable |`10ms`|
0 commit comments