diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-09 18:11:20 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-09 18:11:20 +0100 |
commit | d6105778839cbdae5bfd234d54929b972328a6ee (patch) | |
tree | e037420649d3c9e01efb59e8f6594f1b19439242 /src/buildtool/execution_api/local/local_cas.hpp | |
parent | f08ea2051eeff565d7d63d721371206133c48b63 (diff) | |
download | justbuild-d6105778839cbdae5bfd234d54929b972328a6ee.tar.gz |
LocalCAS: Set epoch time for every entry
... and refactor static constant to proper format `kFdLess`.
Diffstat (limited to 'src/buildtool/execution_api/local/local_cas.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_cas.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/local/local_cas.hpp b/src/buildtool/execution_api/local/local_cas.hpp index 470c38b9..f5158662 100644 --- a/src/buildtool/execution_api/local/local_cas.hpp +++ b/src/buildtool/execution_api/local/local_cas.hpp @@ -52,8 +52,8 @@ class LocalCAS { Logger logger_{std::string{"LocalCAS"} + kSuffix}; std::filesystem::path const cache_root_{ LocalExecutionConfig::GetCacheDir()}; - FileStorage<kType> file_store_{cache_root_ / - (std::string{"cas"} + kSuffix)}; + FileStorage<kType, StoreMode::FirstWins, /*kSetEpochTime=*/true> + file_store_{cache_root_ / (std::string{"cas"} + kSuffix)}; [[nodiscard]] static auto CreateDigest(std::string const& bytes) noexcept -> std::optional<bazel_re::Digest> { |