# Database Engine

### 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.&#x20;

```json
{
  "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 `MONGO`with 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.&#x20;

`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.

{% hint style="info" %}
If you need help with any of the other config variables, or have questions, please open a support ticket in our [Discord.](https://guccidev.us/discord)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.supremeventures.ca/important-information/configuration-options/database-engine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
