Skip to content

Support multiple compression algorithms when restoring cache #543

@Vampire

Description

@Vampire

Currently if you create a cache entry on a system where gzip is used and then restore the cache on a system where zstd is used, you get a cache miss.
It would be nice if instead mutliple compression algorithms were supported.
Something like this:

on cache creation:

  • zstd with --long present
    • use zstd with --long
    • end
  • zstd present
    • use zstd
    • end
  • use gzip

on cache restoring:

  • zstd with --long present
    • if according cache entry is present
      • use that
      • end
    • if according cache entry is not present
      • continue
  • zstd present
    • if according cache entry is present
      • use that
      • end
    • if according cache entry is not present
      • continue
  • use gzip
    • if according cache entry is present
      • use that
      • end

This way, for example a cache entry created on a gzip system can be used even on a zstd system.

And to be even fancier, when restoring a "lower" level (gzip or zstd on zstd with --long, or gzip on zstd), the file could be recompressed with the "higher" level and a new cache entry for that higher level created, so that next time it can be used more efficiently.

Metadata

Metadata

Assignees

Labels

cacheenhancementNew feature or requestwontfixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions