diff options
Diffstat (limited to 'src/buildtool/storage/target_cache.hpp')
-rw-r--r-- | src/buildtool/storage/target_cache.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buildtool/storage/target_cache.hpp b/src/buildtool/storage/target_cache.hpp index e54c2e42..b20b71e3 100644 --- a/src/buildtool/storage/target_cache.hpp +++ b/src/buildtool/storage/target_cache.hpp @@ -22,6 +22,8 @@ #include "gsl/gsl" #include "nlohmann/json.hpp" +#include "src/buildtool/build_engine/base_maps/entity_name_data.hpp" +#include "src/buildtool/build_engine/expression/configuration.hpp" #include "src/buildtool/common/artifact.hpp" #include "src/buildtool/file_system/file_storage.hpp" #include "src/buildtool/file_system/object_type.hpp" @@ -93,6 +95,15 @@ class TargetCache { TargetCacheEntry const& value, ArtifactDownloader const& downloader) const noexcept -> bool; + /// \brief Calculate TargetCacheKey based on auxiliary information. + /// Doesn't create a TargetCacheEntry in the TargetCache. + /// \return TargetCacheKey on success. + [[nodiscard]] auto ComputeKey( + std::string const& repo_key, + BuildMaps::Base::NamedTarget const& target_name, + Configuration const& effective_config) const noexcept + -> std::optional<TargetCacheKey>; + /// \brief Read existing entry and object info from the target cache. /// \param key The target-cache key to read the entry from. /// \param shard Optional explicit shard, if the default is not intended. |