httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject mod_cache: caching status
Date Sun, 26 Sep 2010 23:59:53 GMT
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


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.


View raw message