Jody Caldwell Posted October 28, 2021 Share Posted October 28, 2021 I am writing a C# add-in. I need to cache some data while the Spotfire document is open (both Desktop and WebPlayer), but I don't want to save the data in the document. What is the best way to do this Link to comment Share on other sites More sharing options...
Jody Caldwell Posted November 22, 2021 Author Share Posted November 22, 2021 it MIGHT be possible to use a RuntimeConstant, where the constant is a class that we manage the details of, with the RuntimeConstant set to be not serialized.See sample code containing:[NonSerialized] private readonly SpotfireSDKFramework.DocumentModel.RuntimeConstant<BackgroundImageGenerator> _backgroundImageGeneratorRuntimeConstant;I don't know that this will work, and it will depend upon how much is serialized. I just stumbled upon this and didn't want to lose it. Link to comment Share on other sites More sharing options...
Jody Caldwell Posted December 3, 2021 Author Share Posted December 3, 2021 another option might be to create a custom node that supports this caching. see sample code containing "NavigateToPageToolState" - the state is the cached data. (probably to be combined with the previously mentioned RuntimeConstant property) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now