Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have an Ubuntu 12.04 Linux server sharing files via NFSv4. I mount the share on my MacBook Pro running Mac OS X 10.7.5. I have the NFS share set up to automount in Disk Utility with default mount options.

I find that when changes happen on the server in a directory that I have had open in the Finder recently, the Finder does not reflect the changes for a very long time. If I use the terminal to "ls" the same directory, I see the changes. It seems that the Finder is caching directory listings locally, and that this caching is very aggressive.

Closing and reopening the window doesn't help. Force quitting the Finder does not help. Unmounting and remounting the NFS share does not help. Rebooting works, but that's a very blunt instrument.

Has anyone experienced this, and does anyone know of any workarounds? I'm looking to eliminate the caching, so that the Finder does to the VFS layer on every access, or at least shorten the TTL of the cached data.

I've evaluated changing the share to SMB or AFP, but I cannot undertake that and am looking for a way to manually invalidate Finder's cache (or otherwise poke at it) if I can't change Finder's behavior outright.

ETA: This doesn't seem to be an issue any more in Mavericks.

share|improve this question
    
Are you looking how to troubleshoot this? Are you looking for someone to suggest different technology. I get the desire for confirmation that others may have experienced this, but what are you looking to do next? –  bmike Apr 30 '13 at 15:36
    
That's a good question. I don't want to switch to SMB or AFP. Instead, I'm looking for a way to disable the Finder's caching behavior or even a way to manually invalidate that cache. –  smammy May 1 '13 at 17:28
add comment

3 Answers

I could confirm that there is such a problem, but it's not been consistent for me. I've just checked against SAMBA and NFS shares on the same server, using the same directories and file for the test. I've had an updated view for both shares in Finder, two times in a row. However, I've experienced the problem as described before. Looks like it happens under more specific conditions.

I do not see this problem using other protocols like AFP or SMB, so the obvious workaround would be to alter the server if we can't isolate / affect Finder's caching. In the mean time, you know this might be one solution if no better solution arises here.

share|improve this answer
add comment

Okay, so...

Please be sure to answer the question.

I have no answer, and I'm not allowed to comment, and there's no link to asking a private question to smammy, so I have no other option but "answering the question" here. Sorry.

@smammy, did you ever get this to work?

I'm terribly frustrated by this behavior. I used to have similar behavior with CIFS shares, but using XtraFinder or PathFinder helped. I really hate PathFinder, so I can't test with that, but the Refresh option in XtraFinder doesn't help in this case.

It seems insane that the F5 button in Finder should be hardwired to the reset switch on my case, but in a lot of cases it seems to be the case.

Again, sorry for this "answer", but I really need to know if smammy got this working.

share|improve this answer
1  
No, I never did find a solution for this. –  smammy Jul 12 '13 at 20:05
    
Thanks for responding :) PS: These days, not only do we get stale listings, Finder won't shows crossmounts even when using v4 (while Terminal will)... Fudge... Fudging fudge... –  DanielSmedegaardBuus Oct 8 '13 at 22:05
    
have you tried this on 10.9 and do you still see the issues there? It's all resolved for me. –  smammy Feb 24 at 17:45
    
@smammy Nope, I haven't tried that — I kinda gave up on NFS and went looking for Linux-based AFS servers instead. Haven't gotten that up and running either, so it's definitely worth a try (AFAIR, AFS was actually replaced by CIFS as the default protocol in Mavericks, so perhaps it was the big clean up time?). Thanks! –  DanielSmedegaardBuus Mar 25 at 14:10
add comment

I had the same problem and found a solution here that worked for me:

dscacheutil -flushcache
killall Finder

The man page of dscacheutil says that the -flushcache option should only be used in extreme cases, so there may be risks to this method that I'm not aware of.

share|improve this answer
    
-flushall doesn't appear to be a valid switch to dscacheutil (on 10.8 at least). –  smammy Feb 24 at 17:44
    
It should be -flushcache, as edited now. Thanks for pointing it out, @smammy. –  user1248490 Feb 25 at 9:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.