We are using cache for anonymous users and authenticated users, this is done by settings a cookie for authenticated users and using a fastcgi_cache_key like this: fastcgi_cache_key "$host$key_uri$cookie_OctopusCacheID"; The problem is that we are not able to clear the cache for both anonymous users and authenticated users (using ngx_cache_purge), we can clear the cache for anonymous users without a problem since $cookie_OctopusCacheID is empty, but for the authenticated users it isn't possible.
Feature request:
Add a new directive fastcgi_cache_key_suffix
Construct the caching filename like this md5(fastcgi_cache_key) . '_' . fastcgi_cache_key_suffix
This will allow ngx_cache_purge to just issue a delete using a wildcard by executing:
del md5(fastcgi_cache_key)
del md5(fastcgi_cache_key) . '_*'
Or am I missing something?