Skip to content

Commit

Permalink
Avoid extra file by using both checksums in cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
bladealslayer committed Aug 16, 2018
1 parent c22670d commit 44e6dee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .circleci/config.yml
Expand Up @@ -26,12 +26,9 @@ jobs:
keys:
- bundler-cache-v2-{{ checksum "Gemfile.lock" }}
- bundler-cache-v2-
- run:
name: generate node package file for cache checksum
command: cat package.json client/package.json > .package.json.tmp
- restore_cache:
keys:
- node-cache-v2-{{ checksum ".package.json.tmp" }}
- node-cache-v2-{{ checksum "package.json" }}-{{ checksum "client/package.json" }}
- node-cache-v2-
- run:
name: install system deps
Expand All @@ -48,7 +45,7 @@ jobs:
- vendor/bundle
- ~/.bundle
- save_cache:
key: node-cache-v2-{{ checksum ".package.json.tmp" }}
key: node-cache-v2-{{ checksum "package.json" }}-{{ checksum "client/package.json" }}
paths:
- ~/.nvm
- client/node_modules
Expand Down

0 comments on commit 44e6dee

Please sign in to comment.