update the descriptions for cache_control keys

This commit is contained in:
teddit 2021-11-26 21:46:24 +01:00
parent 30d0000dca
commit 08e9f90233
2 changed files with 4 additions and 5 deletions

View File

@ -146,9 +146,8 @@ The following variables may be set to customize your deployment at runtime.
| post_comments_sort | Defines default sort preference. Options are *confidence* (default sorting option in Reddit), *top*, *new*, *controversal*, *old*, *random*, *qa*, *live*. Defaults to **confidence** |
| reddit_app_id | If "use_reddit_oauth" config key is set to true, you have to obtain your Reddit app ID. For testing purposes it's okay to use this project's default app ID. Create your Reddit app here: https://old.reddit.com/prefs/apps/. Make sure to create an "installed app" type of app. Default is **ABfYqdDc9qPh1w** |
| domain_replacements | Replacements for domains in outgoing links. Tuples with regular expressions to match, and replacement values. This is in addition to user-level configuration of privacyDomains. Defaults to **[]** |
| cache_control | *Boolean* If true, teddit will automatically try to keep the size of the cache directory under ```config.cache_max_size```. Defaults to **true** |
| cache_max_size | In Megabytes (MB), how much can we cache media files to the disk? Default is 3000 MB (~3 GB). Note: This is not perfectly exact limit. Defaults to **3000** |
| cache_control_interval | How often the size of the cache directory is checked. Default is every 30 minutes. Defaults to **1000 * 60 * 30** |
| cache_control | *Boolean* If true, teddit will automatically remove all cached static files. Defaults to **true** |
| cache_control_interval | How often the cache directory for static files is emptied. Default is every 24 hours. Requires cache_control to be true. Defaults to **1000 * 60 * 60 * 24** |
### Manual

View File

@ -32,8 +32,8 @@ const config = {
domain_replacements: process.env.DOMAIN_REPLACEMENTS
? (JSON.parse(process.env.DOMAIN_REPLACEMENTS).map(([p, r]) => [new RegExp(p, 'gm'), r]))
: [], // Replacements for domains in outgoing links. Tuples with regular expressions to match, and replacement values. This is in addition to user-level configuration of privacyDomains.
cache_control: process.env.CACHE_CONTROL !== 'true' || true, // If true, teddit will automatically try to keep the size of the cache directory (static) under config.cache_max_size. By default this is set to true.
cache_control_interval: process.env.CACHE_CONTROL_INTERVAL || 1000 * 60 * 60 * 24, // How often the cached static directory is emptied. Default is every 24 hours minutes.
cache_control: process.env.CACHE_CONTROL !== 'true' || true, // If true, teddit will automatically remove all cached static files. By default this is set to true.
cache_control_interval: process.env.CACHE_CONTROL_INTERVAL || 1000 * 60 * 60 * 24, // How often the cache directory for static files is emptied. Requires cache_control to be true. Default is every 24 hours.
post_media_max_heights: {
/**
* Sets the max-height value for images and videos in posts.