#disable crippling memoization · shykes/d...
1 messages · Page 1 of 1 (latest)
Can you clarify what problem this is solving? Sorry I'm missing some context here.
Is it because the module code itself is cached, so you can't use a time.Now() within a module for selectively cache busting?
Yeah, the function call itself is cached, so the responsibility for cache-busting moves arbitrarily higher up the stack
More discussion in https://discord.com/channels/707636530424053791/1156315986023170129
Got it. I was wondering what implication that might have on modules like https://github.com/kpenfound/dagger-modules/blob/main/golang/main.go
where the module is all code and no containers
I see Helder called out this case already ❤️
Yeah it's definitely a side-effect in your case (sorry!), but forced memoization made every non-hermetic function (which is most functions) basically useless