Friday, February 22, 2013

lophttpd caching trickery

I added 404-caching to lophttpd, in the hope thatit will result in overall speedup if a lot of clientstry to fetch non-existing files (favicon.ico etc.)The key for the cache is the first line that is sent,so once we see this request again, we dont need to parse theentire header, decode the pathname and stat() it before we sendthe error reply. Good, eh?