httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <brian.ak...@turner.com>
Subject Re: [PATCH] mod_disk_cache deterministic tempfiles
Date Wed, 17 Aug 2005 20:11:01 GMT
Graham Leggett wrote:

> This is very cool. On my list of things to do was to handle something 
> similar for serving from the cache as well - again to avoid a thundering 
> herd against backend servers while a file is being cached.


I have the thought that we could also serve files that have "recently 
expired" (recent being configurable) if the object was being cached. 
Psudocode:

if(expired < (now - recent)) {
	if(stat(tmpfile) {
		if(mtime_is_resonable) {
			serve_old_file;	
		} else {
			unlimk(tempfile)
		}
	}
}

This would also allow only one request through to "refresh" the object 
and protect against a "hung" worker (bad backend server, database, whatever)



-- 
Brian Akins
Lead Systems Engineer
CNN Internet Technologies

Mime
View raw message