docs: add Performance & Caching section to ConfigurationGuide

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-01 14:40:19 +00:00
parent b79ba81e05
commit d5a95e9270
2 changed files with 34 additions and 2 deletions
+33
View File
@@ -798,6 +798,39 @@ Administrators can set the **site-wide default** colour scheme that is applied w
UI_DEFAULT_COLOR_SCHEME=dark
```
## Performance & Caching
DocuElevate automatically optimises database access and uses Redis as a
caching layer for frequently accessed data.
### Database Indexes
On startup the application creates indexes on columns used for filtering,
sorting, and joining in the file listing and status computation queries:
| Table | Column | Purpose |
|---|---|---|
| `files` | `created_at` | Default sort order |
| `files` | `mime_type` | MIME type filter & dropdown |
| `processing_logs` | `file_id` | Log retrieval by file |
| `processing_logs` | `timestamp` | Log ordering |
| `file_processing_steps` | `status` | Status filter sub-queries |
These indexes are created idempotently on every startup so no manual
migration step is required.
### Redis Query Cache
When Redis is available (configured via `REDIS_URL`), DocuElevate caches
selected query results to avoid redundant database round-trips:
| Cache Key | TTL | Description |
|---|---|---|
| `mime_types` | 120 s | Distinct MIME types shown in the file-list filter dropdown |
The cache is **fail-open**: if Redis is unreachable the application falls
back to querying the database directly with no user-visible impact.
## Configuration Examples
### Minimal Configuration