diff --git a/.circleci/config.yml b/.circleci/config.yml index 55c53b3746..f4f1be7bef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,11 @@ # **NOTE 2**: If you change the version of the docker images, also change the `cache_key` suffix. var_1: &default_docker_image circleci/node:10.12 var_2: &browsers_docker_image circleci/node:10.12-browsers -var_3: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-node-10.12 +# We don't want to include the current branch name in the cache key because that would prevent +# PRs from being able to restore the cache since the branch names are always different for PRs. +# The cache key should only consist of dynamic values that change whenever something in the +# cache changes. (e.g. Yarn lock file changes --> cached "node_modules" are different). +var_3: &cache_key v2-angular-{{ checksum "yarn.lock" }}-node-10.12 # Define common ENV vars var_4: &define_env_vars