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

2 Answers 2

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

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
    
dscacheutil -flushcache alone (no Finder restart) seems to work for me in Yosemite. The Finder doesn't update on its own, but clicking away from the directory and back does refresh. Thanks for this answer - I've been looking for a solution to this problem for YEARS. –  GSnyder Oct 16 at 18:33

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.