Skip to content

Automatically evict zig-cache to stop it growing too large #15358

@silversquirl

Description

@silversquirl

I was recently freeing up some space on my laptop and came across a zig-cache 18GiB in size. This is far larger than reasonable, and it was caused by having ~45 cached copies of a large C library (Binaryen, in this case) each about 340MiB.

Zig could stop this happening by automatically removing old cache entries, either keeping cached data for the most recent n builds, or trying to keep the cache under a certain size. This being configurable per-project would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions