Protected file_cache with a mutex.