Caching .yarn-cache for a project with multiple lock files



We have a multi-service project with multiple yarn.lock files. I can cache node_modules dirs separately, but what would be the recommended way to cache entire ~/.cache/yarn ?

One thought is to do it like this:

- save_cache:
      key: yarn-cache-{{ checksum "dir1/yarn.lock" }}-{{ checksum "dir2/yarn.lock" }}-{{ checksum "dir3/yarn.lock" }}
        - ~/.cache/yarn


I am using the monorepo approach as well so this is something I’d also like to have your advice on.

I’m using lerna for my project, and that has a packages/ dir with many sub-packages.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.