Added cache variable to readme

This commit is contained in:
henry 2025-07-05 20:25:44 -04:00
parent f06994b3c2
commit 9865e722fd
1 changed files with 15 additions and 8 deletions

View File

@ -78,13 +78,19 @@ It is possible for the number of users with access to temporarily exceed the `Ca
Configuration is set in `appsettings.json` or via environment variables. The main configuration section is `AccessQueue`:
- **CapacityLimit**: The maximum number of users that can have access at the same time (default: 100).
- **ActivitySeconds**: How long (in seconds) a user can remain active before being considered inactive (default: 900).
- **ExpirationSeconds**: How long (in seconds) before an access ticket expires (default: 43200).
- **RollingExpiration**: If true, the expiration timer resets on activity (default: true).
- **CleanupIntervalSeconds**: How often (in seconds) the background cleanup runs to remove expired/inactive users (default: 60).
- **BackupFilePath**: The file path where the access queue state will be periodically saved (no default; optional).
- **BackupIntervalSeconds**: How often (in seconds) the state is backed up to disk (no default; optional).
**Required variables:**
- **CapacityLimit**: The maximum number of users that can have access at the same time.
- **ActivitySeconds**: How long (in seconds) a user can remain active before being considered inactive.
- **ExpirationSeconds**: How long (in seconds) before an access ticket expires.
- **RollingExpiration**: If true, the expiration timer resets on activity.
- **CleanupIntervalSeconds**: How often (in seconds) the background cleanup runs to remove expired/inactive users.
**Optional variables:**
- **BackupFilePath**: The file path where the access queue state will be periodically saved.
- **BackupIntervalSeconds**: How often (in seconds) the state is backed up to disk.
- **CacheMilliseconds**: How long (in milliseconds) to cache the active user count before recalculating. Lower values mean more frequent recalculation (more accurate, higher CPU usage). Higher values improve performance but may cause a slight delay in recognizing open spots.
Example `appsettings.json`:
```json
@ -94,7 +100,8 @@ Example `appsettings.json`:
"ActivitySeconds": 900,
"ExpirationSeconds": 43200,
"RollingExpiration": true,
"CleanupIntervalSeconds": 60
"CleanupIntervalSeconds": 60,
"CacheMilliseconds": 1000
}
}
```