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.
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 thepypi-cache
or thevenv-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.
Supporting Documentation Links: