Skip to content

Cache never cleaned #261

Open
Open

Description

@upils

Entries in the cache managed by Chisel (storing, among other things, files from the archive) never expire. On a developer machine, this cache can grow over 10Go over time. This can also become problematic in the context of a CI building environment sharing the cache to build multiple images.

Currently the cache can be manually and safely cleaned between chisel executions. But doing so while retaining the advantages of the cache might be uneasy and be burden.

Automatically cleaning old entries in the cache could be a nice UX improvement.

Activity

  1. lczyk commented on Oct 23, 2026

    @lczyk
    Contributor

    a data point from a dev machine (mine, this one) that has run chisel daily for a few months: ~/.cache/chisel is 38G in 14935 blobs, 9490 of them untouched for a week or more.

    Cache.Expire is already there in internal/cache/cache.go(!) all it would take is to call it after a cut with something like Expire(7 * 24 * time.Hour).

    a side-effect of this bug(?)/shortcoming is that anything that takes views into the cache (e.g. someone's so-far-private work-in-progress chisel tools) keep seeing larger and larger cache and keep getting more and more sluggish. i'm half tempted to start expiring chisel's cache for it from other tools, but i shan't. separation of concerns and all..

  2. lczyk commented on Oct 23, 2026

    @lczyk
    Contributor

    given the above i'm gonna tentatively label this as Bug. ff to unlabel ofc.

  3. lczyk commented on Oct 23, 2026

    @lczyk
    Contributor

    4 thumbs up + it's a tentative blocker for any work looking like #340 + this is really simple to fix. adding appropriate labels.

  4. added
    SimpleNice for a quick look on a minute or two
    PriorityLook at me first
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn undesired feature ;-)SimpleNice for a quick look on a minute or two

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions