1.18.0 performance items: tests, the reference budget gate tightened (JS 195 kB, 404 without its exception, TTL check), docs (performance.md, AGENT.md, iapl-performance, module pages, api.md), changelog: what changes for an existing site
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d628839235
commit
f0127ac1b8
+2
-1
@@ -43,6 +43,7 @@ iapl({
|
||||
| Option (`StatsOptions`) | Default | Description |
|
||||
|---|---|---|
|
||||
| `retentionDays` | `90` | older visits (by `lastAt`) are deleted |
|
||||
| `ttlIndex` | `true` | 1.18.0, MongoDB: a TTL index deletes visits whose last page view is older than `retentionDays`, also on a quiet site; `false` drops it at the next start. Postgres / SQLite: not used |
|
||||
| `timeZone` | `'Europe/Warsaw'` | day boundary (`day` field, salt rotation, charts) |
|
||||
| `dashboard` | `true` | `false` removes only `StatsWidget` from the dashboard — the view and the nav link stay |
|
||||
| `collectionOverrides` | none | changes `stats-visits`: an object merges `access` / `admin` / `hooks` key by key (your keys win), a function `(collection) => collection` takes over (keep the slug). Its `access.read` also decides who sees the stats view and the dashboard chart |
|
||||
@@ -124,7 +125,7 @@ A sequence of page views with gaps under 30 minutes, within one day. A server re
|
||||
instances (each has its own salt) can split an ongoing visit in two — irrelevant for statistics. Do
|
||||
**not** store the salt in the database to "fix" this: then yesterday's hashes could be reversed to IPs.
|
||||
|
||||
Visits older than `retentionDays` are deleted automatically — at most once a day per server process,
|
||||
On MongoDB a TTL index deletes them by itself (`ttlIndex`, 1.18.0). Everywhere, visits older than `retentionDays` are also deleted — at most once a day per server process,
|
||||
on a page view, with one `db.deleteMany` query **in the background** (the page view does not wait for
|
||||
the cleanup; an error goes to the log and the cleanup is retried on the next page view). The salt
|
||||
changes when `day` changes in the `timeZone` zone.
|
||||
|
||||
Reference in New Issue
Block a user