You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces a new configuration option `cache_stale_duration_ms` which
allows users to control how long files are cached before their freshness
is checked. This provides more fine-grained control over caching
behavior, especially in production environments.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,9 @@
8
8
- fix: `sqlpage.variables()` now does not return json objects with duplicate keys when post, get and set variables of the same name are present. The semantics of the returned values remains the same (precedence: set > post > get).
9
9
- add support for some duckdb-specific (like `select {'a': 1, 'b': 2}`), and oracle-specific syntax dynamically when connected through odbc.
10
10
- better oidc support. Single-sign-on now works with sites:
11
-
- using a non-default `site_prefix`
12
-
- hosted behind an ssl-terminating reverse proxy
11
+
- using a non-default `site_prefix`
12
+
- hosted behind an ssl-terminating reverse proxy
13
+
- New config option: `cache_stale_duration_ms` to control the duration for which cached sql files are considered fresh.
Copy file name to clipboardExpand all lines: configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ Here are the available configuration options and their default values:
39
39
|`https_certificate_cache_dir`| ./sqlpage/https | A writeable directory where to cache the certificates, so that SQLPage can serve https traffic immediately when it restarts. |
40
40
|`https_acme_directory_url`|https://acme-v02.api.letsencrypt.org/directory| The URL of the ACME directory to use when requesting a certificate. |
41
41
|`environment`| development | The environment in which SQLPage is running. Can be either `development` or `production`. In `production` mode, SQLPage will hide error messages and stack traces from the user, and will cache sql files in memory to avoid reloading them from disk. |
42
+
|`cache_stale_duration_ms`| 1000 (prod), 0 (dev) | The duration in milliseconds that a file can be cached before its freshness is checked against the filesystem. Defaults to 1000ms (1 second) in production and 0ms in development. |
42
43
|`content_security_policy`|`script-src 'self' 'nonce-{NONCE}'`| The [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to set in the HTTP headers. If you get CSP errors in the browser console, you can set this to the empty string to disable CSP. If you want a custom CSP that contains a nonce, include the `'nonce-{NONCE}'` directive in your configuration string and it will be populated with a random value per request. |
43
44
|`system_root_ca_certificates`| false | Whether to use the system root CA certificates to validate SSL certificates when making http requests with `sqlpage.fetch`. If set to false, SQLPage will use its own set of root CA certificates. If the `SSL_CERT_FILE` or `SSL_CERT_DIR` environment variables are set, they will be used instead of the system root CA certificates. |
44
45
|`max_recursion_depth`| 10 | Maximum depth of recursion allowed in the `run_sql` function. Maximum value is 255. |
0 commit comments