Saturday 3 December 2016

Dispatcher serving, but not caching - request contains authorization

Problem:
Dispatcher is configured but pages are not getting cached due to request containing authorization.

Error:
[Thu Dec 03 7:58:58 2012] [D] [820(139934505617152)] no cache due to authorization header.
[Thu Dec 03 7:58:58 2012] [D] [820(139934505617152)] cache action for [http://localhost/content/geometrixx/en/toolbar.html] NONE

Solution:
By default, if the HTTP request includes an authorization header, the cache is not used. There is a property in the dispatcher.any file:

/allowAuthorized "1" - allow cache if request include authorization header.

Example:
/cache {
   /docroot "C:/Apache2/dispatcher/cache"
   /allowAuthorized "1"
   /rules {
    /0000 {
     /glob "*"
     /type "allow"
    }
   }
  }

Note: See how to configure dispatcher

1 comment :

  1. Hi Kishore,

    I happen to have an opposite scenario - dispatcher caching but not serving. I am on IIS, do you maybe know how to fix this?

    ReplyDelete