Hello,
I would like to implement a feature that performs two actions: resets the User Preferences to those defined in the default, and calls Dict.reset() to clear cached content that was previously generated. I was thinking of a simple boolean "preference" that, once checked (i.e. True), will trigger the aforementioned actions, then be reset to False.
I realise that there are any number of ways to potentially accomplish this, but I'm curious to know if there's a particularly canonical work-flow already established for this sort of scenario. For example, would putting these actions directly in ValidatePrefs() be appropriate, or should it be elsewhere ?
As a corollary, is there a clean way to set User Preferences, i.e. one that doesn't involve crafting HTTP calls to internal endpoints via bespoke URLs ?
Thank you.