From 785a59992e4913584fa7dd9f12880fc43e637104 Mon Sep 17 00:00:00 2001 From: x3 Date: Wed, 28 Feb 2024 12:16:29 +0100 Subject: [PATCH] Add example configuration for caching only by file ID --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 90f0fa8..7c7c33d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,16 @@ server { } ``` +Caching based only on file id can be enabled with this example configuration +```cfg +location ~ /-([a-zA-Z0-9]+)/? { + # Other caching options are omitted here... + proxy_cache_revalidate on; + proxy_cache_key "$host$1"; + # Other options omitted... +} +``` + Then run with `./ngfshare -config /path/to/config.json`. To generate an auth key, run `./ngfshare -config /path/to/config.json -genauth`. ## Api