Database Engine

Info about the database that powers every plugin.

Configuring Cereal

Inside your servers /plugins/SVCommonsLib directory, you'll find cereal.json which can be used to configure the databases of all plugins on the server. In the future it will be possible to utilize different databases on a pre-plugin bases, but for our first implementation we've limited it to one shared instance.

{
  "mode": "FILE", // Also supports MongoDB
  "nodeId": "c88272c9-f0e1-4b99-8df5-3d138e6d6bd7",
  "mongoDBConfig": {
    "uri": "",
    "database": ""
  },
  "fileConfig": {},
  "cacheConfig": {
    "expireAfterAccessMinutes": 60,
    "expireAfterWriteMinutes": 60
  },
  "debug": true
}

Only a few of the above config variables need special attention,

Special Config Options

mode - Currently supports FILE and MONGOwith plans to support MySQL, SQLite, and Postgres in the coming months.

debug - Enables debug logging for caches and data sources.

cacheConfig - This is used to change how long specific items are kept in memory before being freed. These values are in milliseconds, and its recommend they are set between 5 and 15 minutes but every server is different. If peoples are only online for a short time before logging of for a long time, the value should be lower.

nodeId - This value should never be changed. Its used to distinguish servers which share data between each other. This value is assigned and maintained by the plugin.

If you need help with any of the other config variables, or have questions, please open a support ticket in our Discord.

Last updated

Was this helpful?