The second part of this if condition represents the simple check I tried to put in place for stale metadata.  Unfortunately, it is still possible for a file to be deleted and recreated so quickly that the modification time does not change (this is easily illustrated by the failed unit tests).  I could add more clauses to this condition (i.e. access time and length must be equal), but the fundamental issue remains.  It seems like the footer needs to be re-read to know for sure whether its changed.  I could potentially avoid some deserialization time by simply comparing the hash of the current footer to the hash stored in the cache (would need to add code to store that hash; it's not there right now).  I could always add a "clearCache" method, but that feels like it just makes things more confusing and error-prone than it needs to be.  The more I think about it, the more skeptical I am that caching can be properly solved at this level (i.e. without knowing what processes may be editing files in the underlying filesystem, etc).