We prefer to cache the modification time before we read the file.  That way if the file is modified while we are scanning it, our cached time should be older than the final edit time, and we'll scan it again the next time we are asked about the file.

Caching the time after the read opens a race condition where we finish reading the old version, and someone else changes the file before we can get the modification time from it.  In this case we would skip that update entirely and never notice it has occurred.