#pruning cache

1 messages ยท Page 1 of 1 (latest)

violet drum
#

Hi @undone bay,
The way I'm doing it atm is using this trick:

// cache burst logic, after installation
    if noCache {
        s := uniuri.New()
        ctr = ctr.WithEnvVariable("FOO", s)
    }
#

I basically generate a random string, and append it to my container (as an env var). As it will be different everytime I run it, it will burst the cache at this given layer, and force updating each subsequent layer ๐Ÿ˜‡

#

By the way, this feature existed, but not on current Dagger CLI, you're right ๐Ÿ˜‡ Could you please make an issue out-of-it ? (if this solution isn't enough for your needs)

undone bay
#

That works, I think a dedicated env var or something would be useful. I'll make an issue or pull request if I have the time

violet drum