Beispiel #1
0
 def combine_versioned_targets(vts):
   targets = []
   for vt in vts:
     targets.extend(vt.targets)
   cache_key = CacheKeyGenerator.combine_cache_keys([vt.cache_key for vt in vts])
   valid = all([vt.valid for vt in vts])
   return VersionedTargetSet(targets, cache_key, valid)
Beispiel #2
0
  def __init__(self, cache_manager, targets, per_target_cache_keys):
    self._cache_manager = cache_manager
    self.per_target_cache_keys = per_target_cache_keys

    self.targets = targets
    self.cache_key = CacheKeyGenerator.combine_cache_keys(per_target_cache_keys)
    self.valid = not cache_manager.needs_update(self.cache_key)
Beispiel #3
0
 def combine_versioned_targets(vts):
   targets = []
   for vt in vts:
     targets.extend(vt.targets)
   cache_key = CacheKeyGenerator.combine_cache_keys([vt.cache_key for vt in vts])
   valid = all([vt.valid for vt in vts])
   return VersionedTargetSet(targets, cache_key, valid)
Beispiel #4
0
    def __init__(self, cache_manager, targets, per_target_cache_keys):
        self._cache_manager = cache_manager
        self.per_target_cache_keys = per_target_cache_keys

        self.targets = targets
        self.cache_key = CacheKeyGenerator.combine_cache_keys(
            per_target_cache_keys)
        self.valid = not cache_manager.needs_update(self.cache_key)
Beispiel #5
0
 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_sources = self.cache_key.num_sources
     self.valid = not cache_manager.needs_update(self.cache_key)
Beispiel #6
0
 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_sources = self.cache_key.num_sources
     self.valid = not cache_manager.needs_update(self.cache_key)