Yes, you can use the directive
CacheIgnoreURLSessionIdentifiers to ignore any query parameter for caching purposes (e.g.
Just make sure that all URLs behind the cache behave the same, regardless of the existence and the value of the parameter. Else the cache might deliver wrong content.
The documentation only mentions session identifiers as an use case but states
CacheIgnoreURLSessionIdentifiers lets define a list of identifiers that are removed from the key that is used to identify an entity in the cache, such that cacheable resources are not stored separately for each session.
The implementation in
modules/cache/cache_storage.c checks two cases:
* Check that we have a parameter separator in the last segment
* of the path and that the parameter matches our identifier
;theidentifier=foobar is removed from the cache key, if there is such a parameter at the end of the path (and before the query string).
* Check if the identifier is in the query string and cut it out.
theidentifier=foobar is removed from the query string part of the cache key. The code also does clean cutting, so that no trailing
? is left. As a result the cache handles a request for
/index.html?theidentifier=foobar exactly like a request for