Hi all,

One of the things that mod_cache doesn't do very well is tell the world what it is doing. This can vary from "did this request score a miss/hit/revalidate?" to "how efficient is this url space overall generally". This problem is highlighted in https://issues.apache.org/bugzilla/show_bug.cgi?id=48241 .

I have implemented a cache_status hook that is called once mod_cache has made up it's mind as to whether the entity is a HIT, a MISS or a REVALIDATE, along with the detailed reason for the cache's decision. Other modules can hook themselves in to do more detailed cache statistics gathering should they choose to do so.

A default simple cache_status hook is provided that optionally logs the cache status to the X-Cache header. For the benefit of developers of restful services, the cache also optionally places the detailed cache reason into an X-Cache-Detail header, which can be used during development of restful applications to validate whether cache behaviour is correct.

Regards,
Graham
--

Reply via email to