kalekundert / byoc

MIT License
0 stars 0 forks source link

Add a `refresh()` function? #30

Open kalekundert opened 2 years ago

kalekundert commented 2 years ago

This would increase the cache version number, forcing all parameters to be recalculated on next access, but would not reload any of the configs. I feel like I thought about this before and decided it was a bad idea, but I can't remember the reasoning now.

Here's the application I have in mind now: if I set several parameters in python (e.g. setattr), it may be that that would cause other parameters to change (e.g. Method getters based on the original parameters). It's reasonable that I might know that the parameters I set would not cause any of the configs to change, so there's no need to reload them. This requires that I be right about none of the configs changing, but that's a decision the user can make.