From 3a6f19de48366a616eaffd9dd6c4d4712e0b6c27 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 11 Mar 2019 10:26:08 -0400 Subject: stage1 caching system: detect problematic mtimes closes #2045 --- src/cache_hash.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cache_hash.hpp') diff --git a/src/cache_hash.hpp b/src/cache_hash.hpp index 5be02ea405..e2a10270f3 100644 --- a/src/cache_hash.hpp +++ b/src/cache_hash.hpp @@ -15,7 +15,7 @@ struct LinkLib; struct CacheHashFile { Buf *path; - OsTimeStamp mtime; + OsFileAttr attr; uint8_t bin_digest[48]; Buf *contents; }; @@ -57,6 +57,8 @@ void cache_file_opt(CacheHash *ch, Buf *path); // added any files before calling cache_hit. CacheHash::b64_digest becomes // available for use after this call, even in the case of a miss, and it // is a hash of the input parameters only. +// If this function returns ErrorInvalidFormat, that error may be treated +// as a cache miss. Error ATTRIBUTE_MUST_USE cache_hit(CacheHash *ch, Buf *out_b64_digest); // If you did not get a cache hit, call this function for every file -- cgit v1.2.3