On Thu, 2008-08-21 at 13:52 -0700, John Caruso wrote: > On Thursday 12:08 PM 8/21/2008, Titi Alailima wrote: > >It's perfectly acceptable in dealing with caching systems that the cached > >value could be out of sync, but not that the cached value could be for > >something entirely different from what you were looking for. > > Yep. I think that aspect of the issue has been getting lost--it's not > just about getting stale data from a given file, but getting data from an > entirely *different* file, which I'd agree violates any reasonable > expectation of a caching system.
John, Your patch fixes this issue as best it can be fixed. The issue that Titi is addressing cannot be fixed. With your patch you can be sure of the following: 1. All cache entries are unique. You can't create and cache two files with the same inode and mtime and have both be over 1 second old. 2. When an inode is reused (by the filesystem) the associated file mtime will be larger than the mtime of the cached entry. The new entry will replace the old entry. 3. If several files point to the same inode, updating this entry updates all of them (there is only one cache entry if the inode is used.) 4. If a file changes on disk, and it is less than 2 sec old, it is served directly, skipping the cache. tom jackson -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.