I've built an extension that creates custom data functions and allows the user to edit them. I'd like to be able to alter the 'AllowCaching' setting, but the only public API method for setting the value is on the DataFunctionDefinitionBuilder class - so I can only set the value when I first create the DataFunction and cannot alter it thereafter.
The DataFunctionDefininition is an immutable class by design, but settings such as 'AllowCaching' can be changed by replacing the current DataFunctionDefinition instance:
Thanks - I hadn't realised I could change the DataFunctionDefinition property to a new one (seems a little odd, but works :)).