diff --git a/README.md b/README.md index ddcd47d..46d42b6 100644 --- a/README.md +++ b/README.md @@ -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 } } ```