cache the result of pid_file