How to cache a variable

Hello everyone!

Can someone explain me, how I can store and get a variable, which is available after an IDE restart?
For example a simple String like "Hello World!" would be great!

Thanks in advance!

Regards,
Fabian

0
2 comments

Hi Fabian,
try something like:

// store property
PropertiesComponent.getInstance().setValue( "mypropertystring", "hello world" );


// load property
String value = PropertiesComponent.getInstance().getValue( "mypropertystring" );



greetings, Kay

0

Hi Kay,

it works! :)
Thank you.

0

Please sign in to leave a comment.