Class VcsBranchNameCache


  • public class VcsBranchNameCache
    extends Object
    A cache that stores a mapping logical -> physical branch for a (build configuration, vcs root) pair. Stores this mapping only for build configuration for which logical branches were requested.
    If the information is requested for the new configuration and vcs root, the mapping will be computed from the latest RepositoryState and stored in cache.
    If the getVcsBranchNamesByLogicalBranch(BuildTypeEx, String, List) is going to be called for multiple logical branches, it makes sense to precalculate the mapping with precalculateVcsBranches(BuildTypeEx), because even to determine if the information in cache needs updating, we need to get the state and calculate a hash from all its branches, which might be a long operation for big repositories
    Since:
    2024.3