I want to add some callbacks to a MetadataCache in an load method and then cancel it in an unload method. Could someone please post some code that actually compiles and runs?
The on method registers the callback and I have got that working. Presumably the off method cancels the callback somehow, but it is completely undocumented, so how do I make it work?