From 1c7b377b722eb0ea2d87bac702e9d4d2036d4c92 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Fri, 26 Jan 2018 09:39:11 -0500 Subject: [PATCH] Change cache key strategy Only look to master- on full-fail, never to "any branch". Use a simple numeric prefix which we can bump to clear it all. --- .circleci/config.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50f981c..77de550 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,11 +14,10 @@ references: git ls-files | xargs md5sum > sdigest - restore_cache: keys: - # yamllint disable-line rule:line-length - - stack-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} - - stack-{{ .Branch }}-{{ checksum "rdigest" }}- - - stack-{{ .Branch }}- - - stack- + - 1-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} + - 1-{{ .Branch }}-{{ checksum "rdigest" }}- + - 1-{{ .Branch }}- + - 1-master- - run: name: Dependencies command: make setup @@ -26,8 +25,7 @@ references: name: Build command: make build - save_cache: - # yamllint disable-line rule:line-length - key: stack-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} + key: 1-{{ .Branch }}-{{ checksum "rdigest" }}-{{ checksum "sdigest" }} paths: - ~/.stack - ./.stack-work