From d16f1b1cf33bacf1ce32caaf446e9bce5d28b5f5 Mon Sep 17 00:00:00 2001 From: x3 Date: Wed, 28 Feb 2024 13:44:09 +0100 Subject: [PATCH] ID Cache location fix pt2 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c0d4b8..fcbe498 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,10 @@ server { } ``` -Caching based only on file id can be enabled with this example configuration +(Optional) Caching based only on file id can be enabled with this example configuration ```cfg -location ~ ^/-([a-zA-Z0-9]+) { +# Will match '/-{id}' '/-{id}/' '/-{id}/name' but not '/-{id}/name/other' +location ~ ^/-([a-zA-Z0-9]+)(?:/?$|/[^\/]+$) # Other caching options are omitted here... proxy_cache_revalidate on; proxy_cache_key "$host$1";