Commit Graph

3 Commits

Author SHA1 Message Date
dlorenc 4feed0ff35
Stop storing a separate cache hash. (#560)
This is unrequired, mtimes should be taken into account during caching.
2019-02-14 12:24:43 -06:00
Priya Wadhwa 80a449f541 code review comments 2018-09-07 16:03:56 -07:00
Priya Wadhwa 13accbaf32 Add Key() to LayeredMap and Snapshotter
This will return a string representaiton of the current filesystem to be
used with caching.

Whenever a file is explictly added (via ADD or COPY), it will be stored
in "added" in the LayeredMap. The file will map to a hash created by
CacheHasher (which doesn't take into account mtime, since that will be
different with every build, making the cache useless)

Key() will returns a sha of the added files which will be used in
determining the overall cache key for a command.
2018-09-04 13:42:33 -07:00