Valeriya Ermilova
Valeriya Ermilova

Reputation: 21

Reusing pip cache. Pipenv install results in constantly growing cache

I need to upload pipenv cache to S3 bucket after installing the dependencies as part of the CI run. I set PIPENV_CACHE_DIR env var to a path where to store cache and run installation command as follows:

export PIPENV_CACHE_DIR=$env.WORKSPACE/.pipenv-cache
pipenv install --deploy

But with every run the cache that is uploaded to the bucket grows by ~same size. Adding --clear option doesn't change it.

I tried to run pipenv commands locally and check size of cache folders (under /Library/Caches/pip and .pipenv-cache set by PIPENV_CACHE_DIR).

pipenv install --deploy -> cache folders don't grow.

pipenv lock -> /Library/Caches/pip/http grew by 16M, .pipenv-cache grew by 2M.

What causes this behavior of growing cache and is there any solution to prevent it?

versions:

Upvotes: 2

Views: 96

Answers (0)

Related Questions