We are migrating from Apache2.2 to Apache2.4 , seeing a strange behavior with curl -I HEAD request ,when then content is not cached on Apache , cache control header is not set, but once the content is cached on Apache header is set . Any one have any idea why this is happening.
cache control rule on Apache
Header always set Cache-Control "public, max-age=86400"
This is an expected behavior/ feature in dispatcher 4.1.11 onwards for caching HTTP response headers.
/headers property under /cache section allows to define the HTTP header types that are going to be cached by the Dispatcher. On the first request to an uncached resource, all headers matching one of the configured values (see the configuration sample below) are stored in a separate file, next to the cache file. On subsequent requests to the cached resource, the stored headers are added to the response.