Support for uncached data loading

So you don't have to restart the server, you can add "cache_data": false option to config.json to not cache data.
Documented in CONFIG.md
I added a require_module function that either does or does not cache the data based on this configuration option.

Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
2025-09-24 20:37:35 +01:00
parent 3f173fc2e3
commit 35e6b94ba1
4 changed files with 23 additions and 4 deletions

View File

@@ -14,7 +14,8 @@ All options show an example configuartion value and the variable type + an expla
| enable_hitcount | true | Boolean | Enabling the hitcount (a number that represents the amount of front page loads (stored in hitcount.txt)) can slightly slow down loading of the front page. |
| charset | "UTF-8" | String | This is the value in the <meta charset=""> tag in the html of all pages, you should not change this unless you know why. |
| root_path | "/path/to/root/of/website" | String | Anything in this directory will be in the webroot, so put favicon.ico and anything else here. |
| data_storage | "json" | String | JSON is currently the only supported format, but SQL is going to be added/is a work in progress |
| cache_data | true | String | Not caching data means you can edit the posts, users, comments etc, maunally and not have to restart the server, however, for large instances this is not reccomended as it takes longer to load the required data. Note: config.json always needs a restart |
## Basic Customisation
| name | example value | variable type | explanation |
|-----------------|----------------------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|