Very slow restore_cache, npm install on each job is quicker


#1

I am trying to use restore_cache and the save_cache to store node_modules for multiple workflows in Circle 2.0 config.yml

      - restore_cache:
          key: dependencies-v1-{{ checksum "package.json" }}
      - run: npm install
      - save_cache:
          key: dependencies-v1-{{ checksum "package.json" }}
          paths:
            - node_modules

The build job currently performs restore_cache and save_cache and the other workflows requires: the build job.

I am seeing the cache taking a very long time to come back. The node_modules folder is ~230mb.
It is actually quicker to just npm install on the three different jobs.

Is this right, is this to be expected?


#2

FYI my bad on this.
I was using a node alpine docker node:8.2.1-alpine which meant the restore_cache and save_cache did not work.

Swapping to a non alpine node docker node:8.2.1 means restore_cache and save_cache now work as expected.


#3