Skip to content

Commit 20d6ad9

Browse files
alan-agius4mgechev
authored andcommitted
ci: remove circle ci cache fallback
Cache fallback can be useful in some cases, but in our case it is hindering the CI performance as the cache is growing everyday which results in slower CI times because of the restoring and saving phases. A fresh cache size is about 450Mb, while currently with fallbacking enabled it has grown to 3.8Gb Below are some timings taken were we see that having cache fallbacking is doesn't help CI times: | Caching | Cache Size | Restore Cache | Yarn Install | Save Cache | Total Time Elapsed | |---------------------------|------------|---------------|--------------|------------|--------------------| | Cache w/ Fallback (Miss) | 3.81Gb | 2m 50s | 30s | 7m 20s | 10m 40s | | Cache w/ Fallback (Hit) | 3.81Gb | 2m 50s | 20s | 0 | 3m 10s | | Cache wo/ Fallback (Miss) | 0 | 0 | 40s | 30s | 1m 10s | | Cache wo/ Fallback (Hit) | 458mb | 20s | 20s | 0 | 40s |
1 parent b523231 commit 20d6ad9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.circleci/config.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,10 @@ version: 2.1
1212
# Variables
1313

1414
## IMPORTANT
15-
# If you change the cache key prefix, also sync the fallback_cache_key fallback to match.
16-
# Keep the static part of the cache key as prefix to enable correct fallbacks.
1715
# Windows needs its own cache key because binaries in node_modules are different.
1816
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
19-
var_1: &cache_key angular_devkit-0.12.0-{{ checksum "yarn.lock" }}
20-
var_2: &cache_key_fallback angular_devkit-0.12.0
21-
var_1_win: &cache_key_win angular_devkit-win-0.12.0-{{ checksum "yarn.lock" }}
22-
var_2_win: &cache_key_fallback_win angular_devkit-win-0.12.0
17+
var_1: &cache_key angular_devkit-12.9-{{ checksum "yarn.lock" }}
18+
var_1_win: &cache_key_win angular_devkit-win-12.9-{{ checksum "yarn.lock" }}
2319
var_3: &default_nodeversion "12.9"
2420
# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
2521
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
@@ -133,7 +129,6 @@ jobs:
133129
- restore_cache:
134130
keys:
135131
- *cache_key
136-
- *cache_key_fallback
137132
- run: yarn install --frozen-lockfile
138133
- persist_to_workspace:
139134
root: *workspace_location
@@ -308,7 +303,6 @@ jobs:
308303
- restore_cache:
309304
keys:
310305
- *cache_key_win
311-
- *cache_key_fallback_win
312306
- run: yarn install --frozen-lockfile
313307
- run: yarn build
314308
- save_cache:

0 commit comments

Comments
 (0)