本文整理汇总了Python中pants.base.build_invalidator.CacheKeyGenerator.combine_cache_keys方法的典型用法代码示例。如果您正苦于以下问题:Python CacheKeyGenerator.combine_cache_keys方法的具体用法?Python CacheKeyGenerator.combine_cache_keys怎么用?Python CacheKeyGenerator.combine_cache_keys使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.base.build_invalidator.CacheKeyGenerator
的用法示例。
在下文中一共展示了CacheKeyGenerator.combine_cache_keys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pants.base.build_invalidator import CacheKeyGenerator [as 别名]
# 或者: from pants.base.build_invalidator.CacheKeyGenerator import combine_cache_keys [as 别名]
def __init__(self, cache_manager, versioned_targets):
self._cache_manager = cache_manager
self.versioned_targets = versioned_targets
self.targets = [vt.target for vt in versioned_targets]
# The following line is a no-op if cache_key was set in the VersionedTarget __init__ method.
self.cache_key = CacheKeyGenerator.combine_cache_keys([vt.cache_key
for vt in versioned_targets])
self.num_chunking_units = self.cache_key.num_chunking_units
self.valid = not cache_manager.needs_update(self.cache_key)