Phil Pennock wrote: > On 2008-01-04 at 16:07 -0800, Michael G Schwern wrote: >> Of course, as Peter insinuated, I'm sure by now it's been rationalized as a >> "feature". > > In large environments, having everything always locally available on > local disk is fairly recent, with cluster management systems etc. NFS > is still common. > > I'm in an environment where I work hard to keep my shell from having to > go scan places in random NFS mounts, including syncing two-line shell > wrappers to a special bin-dir within my NFS homedir since then at least > if the dir cache gets flushed it's flushed by me, not by dint of someone > somewhere always updating something. Heck, they go into aliases so the > commands are only a backup for when scripts are invoking the > command-name expecting it to be in the path. Without this grotesque > hackery, regular work becomes nightmarish during the business day. > > Caches which don't cache negative results don't tend to be effective > caches. The question is whether or not a cache should be used at all. > > So the feature is useful in some environments but probably shouldn't be > the default these days. People in such environments can learn to use it > and people whose idea of Unix is a single modern computer with local > disks can't conceive of set-ups different from their own and whine a > lot. Bloody Linux users. > > (zsh has a similar feature)
I think you've veered off into a wholly different and more subtle hate. We're not talking about not caching negative results, as in "there was a command called 'foo' at /path/to/foo and now it's gone. I didn't find it the last ten times I scanned PATH but maybe the eleventh will work!" For that, caching the time of the last negative result would be handy, then you could at least do a progressive back off. Even so, it only effects performance when you try to run the missing command. We're talking about "there was a command called 'foo' at /path/to/foo and now /path/to/foo is gone. Well, that's the best I can do, I give up. You're welcome to blow away THE ENTIRE CACHE and I'll rescan EVERYTHING for you. k thx bye!" I would think that would generate maximum hate in a slow environment. And, of course, WHY IS THIS STILL THE DEFAULT?! -- I am somewhat preoccupied telling the laws of physics to shut up and sit down. -- Vaarsuvius, "Order of the Stick" http://www.giantitp.com/comics/oots0107.html