1

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.

  • AFAIK CacheIgnoreURLSessionIdentifiers doesn't prevent caching, but rather ignores the specified query string params when a resource is cached. So, if you specified foo and bar 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:36
  • ... or maybe that is what you require? You do still want the resource cached? ...mod_cache - server-side caching module. – MrWhite Sep 9 '16 at 20:55
  • @w3dk Thats what I want....want to ignore querystring parameters. I guess my question really is should CacheIgnoreURLSessionIdentifiers really be called CacheIgnoreQueryStringParameters as its not specific to session identifiers? – DD. Sep 10 '16 at 10:54
  • 1
    At least according to the docs, CacheIgnoreURLSessionIdentifiers 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.