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
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,7 @@ surrogate_keys:
202
202
| `cdn.service_id` | The service id if required, depending the provider | `123456_id` |
203
203
| `cdn.zone_id` | The zone id if required, depending the provider | `anywhere_zone` |
204
204
| `default_cache.allowed_http_verbs` | The HTTP verbs to support cache | `- GET`<br/><br/>`- POST`<br/><br/>`(default: GET, HEAD)` |
205
-
| `default_cache.allowed_additional_status_codes` | The additional HTTP status code to support cache | `- 200`<br/><br/>`- 404` |
205
+
| `default_cache.allowed_additional_status_codes` | The additional HTTP status code to support cache | `- 200`<br/><br/>`- 404` |
206
206
| `default_cache.badger` | Configure the Badger cache storage | |
207
207
| `default_cache.badger.path` | Configure Badger with a file | `/anywhere/badger_configuration.json` |
208
208
| `default_cache.badger.configuration` | Configure Badger directly in the Caddyfile or your JSON caddy configuration | [See the Badger configuration for the options](https://dgraph.io/docs/badger/get-started/) |
@@ -241,6 +241,9 @@ surrogate_keys:
241
241
| `default_cache.redis.configuration` | Configure Redis directly in the Caddyfile or your JSON caddy configuration | [See the Go-redis configuration for the options](https://github.com/redis/go-redis/blob/master/options.go#L31) or [See the Rueidis configuration for the options](https://github.com/redis/rueidis/blob/master/rueidis.go#56) |
242
242
| `default_cache.regex.exclude` | The regex used to prevent paths being cached | `^[A-z]+.*$` |
243
243
| `default_cache.stale` | The stale duration | `25m` |
244
+
| `default_cache.simplefs` | Configure the SimpleFS cache storage | |
245
+
| `default_cache.simplefs.configuration` | Configure SimpleFS directly in the Caddyfile or your JSON caddy configuration | |
246
+
| `default_cache.simplefs.configuration.size` | Set the size of the pool in Otter | `999999` (default `10000`) |
244
247
| `default_cache.timeout` | The timeout configuration | |
245
248
| `default_cache.timeout.backend` | The timeout duration to consider the backend as unreachable | `10s` |
246
249
| `default_cache.timeout.cache` | The timeout duration to consider the cache provider as unreachable | `10ms` |
@@ -254,10 +257,23 @@ surrogate_keys:
254
257
| `surrogate_keys.{key name}.headers` | Headers that should match to be part of the surrogate key group | `Authorization: ey.+`<br/><br/>`Content-Type: json` |
255
258
| `surrogate_keys.{key name}.headers.{header name}` | Header name that should be present a match the regex to be part of the surrogate key group | `Content-Type: json` |
256
259
| `surrogate_keys.{key name}.url` | Url that should match to be part of the surrogate key group | `.+` |
260
+
| `disable_surrogate_key` | Disable the Surrogate keys storage system | `true` |
257
261
| `ykeys.{key name}.headers` | (DEPRECATED) Headers that should match to be part of the ykey group | `Authorization: ey.+`<br/><br/>`Content-Type: json` |
258
262
| `ykeys.{key name}.headers.{header name}` | (DEPRECATED) Header name that should be present a match the regex to be part of the ykey group | `Content-Type: json` |
259
263
| `ykeys.{key name}.url` | (DEPRECATED) Url that should match to be part of the ykey group | `.+` |
260
264
265
+
## Storages
266
+
Since `v1.7.0` Souin implements only one storage. If you need a specific storage you have to take it from [the storages repository](https://github.com/darkweak/storages) and add it either in your code, during the build otherwise.
All endpoints are accessible through the `api.basepath` configuration line or by default through `/souin-api` to avoid named route conflicts. Be sure to define an unused route to not break your existing application.
263
279
@@ -311,9 +327,12 @@ See the sequence diagram for the minimal version below
The cache system sits on top of three providers at the moment. It provides two in-memory storage solutions (badger and nuts), and two distributed storages Olric and Etcd because setting, getting, updating and deleting keys in these providers is as easy as it gets.
319
338
**The Badger provider (default one)**: you can tune its configuration using the badger configuration inside your Souin configuration. In order to do that, you have to declare the `badger` block. See the following json example.
@@ -966,7 +985,7 @@ experimental:
966
985
plugins:
967
986
souin:
968
987
moduleName: github.com/darkweak/souin
969
-
version: v1.7.6
988
+
version: v1.7.7
970
989
```
971
990
After that you can declare either the whole configuration at once in the middleware block or by service. See the examples below.
0 commit comments