How To Save Configuration Data In A Public Module (Extension)?

Problem:

I need to save and update some module related configuration data in a public module (extension).

Option 1:

Require a db connection (CDbConnection) and let user configure the database and table name in module configuration.

Option 2:

Add a module specific SQLite db connection and require user to set proper permission to "/path/to/module/data/dbfile".

Option 3:

Save data to static files and require user to set proper permission to "/path/to/module/data/file".

Option 4:

Something else?

What would be the proper way of handling this?

bump

Anyone?

I myself just don’t see enough information to give a reasonable answer :)

For example, why do you need to :

?

I would like to add an optional page for Google Analytics data, custom graphs and such to YCM extension, so that admins can have one place to quickly check what’s going on.

Since the Google Analytics API authentication uses OAuth 2.0, I need to save and update those keys, tokens, tracking ID’s and such inside the module configuration.

I guess option 1 would be the preferred way of doing this, if the user wants to have the optional statistics page.

Since all users can have different databases, I guess it’s better to let the users decide what kind of database to use in main configuration file. There also might be restrictions in those databases, it would make sense to let the user decide the name of the table in the module configuration.

bump