forked from FRiCKLE/ngx_cache_purge
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
We are unable to purge the cache entry for the root path ("/") without clearing the entire cache using a wildcard.
Environment:
- nginx version: 1.27.4
- ngx_cache_purge version: 2.5.4
Setup:
- nginx with ngx_cache_purge module
- Cache key format:
$scheme$host$request_uri - Purge endpoint:
location ~ ^/ops/purge(/.*)$ { proxy_cache_purge cache_zone $scheme$host$1; } - Actual cache key for root:
httpmyapp.example.com/(scheme + host +/)
Problem:
When attempting to purge the root path cache entry:
-
Exact match purge (
/ops/purge/) → Returns HTTP 412- Expected cache key:
httpmyapp.example.com/ - Result: Not purged (HTTP 412 - NGX_DECLINED)
- Expected cache key:
-
Wildcard purge (
/ops/purge/*) → Returns HTTP 200- Problem: Purges ALL cache entries, not just the root path
- This is unacceptable as it clears the entire cache
Questions:
- Does exact key purging work for root path entries?
- Is there something special about purging cache keys that end with just "/" (the root path)?
- Should the cache key
httpmyapp.example.com/be purgeable via exact match?
We would appreciate any guidance on whether this is expected behavior or if there is a configuration/approach we are missing to purge the root path cache entry specifically.
Metadata
Metadata
Assignees
Labels
No labels