Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for partial cache hit #112

Open
tboddyspargo opened this issue Feb 16, 2023 · 0 comments
Open

feat: add support for partial cache hit #112

tboddyspargo opened this issue Feb 16, 2023 · 0 comments

Comments

@tboddyspargo
Copy link

tboddyspargo commented Feb 16, 2023

Describe Request:

Currently, the only restore_cache key is the full key including the lockfile hash. As a result, if any package in the lockfile changes, no cache will be available to the install step at all. This can be fairly impactful as significant time could be saved if the pypi-cache or the venv-cache was available so that unchanged dependencies wouldn't have to be re-downloaded, rebuilt, and/or re-installed.

I would love it if you could add the option to include cache key prefixes in the restore-cache step to enable this performance and time saver.

Examples:

In this example, one key represents a version prefix, the python version checksum, and the lockfile checksum. The other includes only the version prefix and the python version checksum. The cache would be updated/saved every time the lockfile, python version, or version prefix changed, but there would still be cache hits even if the lockfile had changed.

- restore_cache:
    keys:
      - v9-cci_pycache-bZAMiWuI9QoA2ErSht0XerDW8Sj18wFhkD_+AQFP54Q=-hW4M+yWz96peTRx9JL1x6TLus+SELu6466Ftu5NiKz8=-
      - v9-cci_pycache-bZAMiWuI9QoA2ErSht0XerDW8Sj18wFhkD_+AQFP54Q=

Supporting Documentation Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant