Limiting the times we call stat_cache_prune, since it is heavy-weight on systems with lots of files.