Plugin Preference Storage

I am working on a plugin for Spark, and I have almost everything working, however, the Development Guide example for storing preferences only says (as a comment) that the plugin “Would load persisted information from file or server”.

I assume there has to be a best practice on where to store this data, and a way to get the folder that the plugin lives in, but I can’t find any documentation on how to do that.

What is the recommended way to store this data? And where?