Hello everybody, While setting up a reverse proxy squid + apache w/ mod_expires.c in order to decrease the load on the web server, I discovered that mod_expires.c was working by checking the mimetype of the content generated by the web server (i.e. cgi or static file) and not the mimetype of the file that was used to generat the output. Could someone explain me why it is so ?
For me, it would make more sense to be able to differentiate what was generated by executing a CGI script and what was generated by reading a static file, especially in caching context like it is the case here. Indeed, I don't think you want to give the same expiration date to a static file (unlikely to change every hour) to a content generated by, let's say, a php script that is using a database (more likely to change every minute). The problem (im my opinion) is that Apache cannot differentiate between those 2 types of stream and, therefore, setting up the cache expiration time for text/html is working both for static files and for cgi scripts outputing text/html content. Is there any plan to change the behavior of mod_expires.c to differentiate between those 2 kinds of data stream before setting the Expires: field of header ? Maybe I'm completely wrong in my observation or there is a part of the big picture I didn't see, any explanation welcome :) Thanks Julien, beginner in modules development