Branch: Tag:

2016-04-07

2016-04-07 13:49:56 by Jonas Walldén <jonasw@roxen.com>

Attempt to use protocol cache for certain authenticated resources as well.

All authenticated requests start out flagged as NO_PROTO_CACHE(), but if the
processing later decides it's cacheable after all we store it in a separate
cache compartment dedicated to data that looks like its protected but in
reality is available to everyone. Future authenticated requests may search
this compartment and get cache hits.

3371:    return;    }    +  int allow_protocache_lookup = 0;    if (rawauth)    {    /* Need to authenticate with the configuration */    NO_PROTO_CACHE(); -  +  allow_protocache_lookup = 1;    array(string) y = rawauth / " ";    realauth = 0;    auth = 0;
3413: Inside #if defined(RAM_CACHE)
  #ifdef RAM_CACHE    TIMER_START(cache_lookup);    array cv; -  if(misc->cacheable && !misc->no_proto_cache && +  if(misc->cacheable && (!misc->no_proto_cache || allow_protocache_lookup) &&    (cv = conf->datacache->get(misc->prot_cache_key, this)) )    {    MY_TRACE_ENTER(sprintf("Checking entry %O", misc->prot_cache_key));