I am looking for a way of specifying a list of query parameters that I want to ignore for caching.
Can I use the directive CacheIgnoreURLSessionIdentifiers
to ignore select query parameters regardless of whether they are used for session identifiers?
This causes cachable resources to be stored separately for each session, which is often not desired. 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 cachable resources are not stored separately for each session.
CacheIgnoreURLSessionIdentifiers
doesn't prevent caching, but rather ignores the specified query string params when a resource is cached. So, if you specifiedfoo
andbar
then/index.php?foo=1&bar=2
would be cached under the key/index.php
- it's still cached. – MrWhite Sep 9 '16 at 20:36CacheIgnoreURLSessionIdentifiers
does seem to apply to any query string params you specify. You'll have to try it. :) Why it makes such close reference to session identifiers I'm not sure, except that maybe session identifiers are probably it's most common usage. – MrWhite Sep 12 '16 at 10:46