SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
People, security and privacy

Data retention

Personal data is deleted automatically once it is older than a period: the email log, the audit log, the error log and security alerts, payments, uninstall backups, request protection's stored answers, the trash, and the modules' data: form submissions, contact messages, appointments, orders and the analytics module's counts. Admins see and change the periods in Settings → Data retention.

What a user can do

  • Admins: see every kind of data with its period, default and minimum, and change a period (never below the minimum). Fixed periods (recognising a visitor, request protection) are shown but can't be changed.
  • Admins: check what the next clean-up would delete, per kind, and clean up now instead of waiting for the hourly job.
  • Editors don't see the Settings screen.
ActionPermissionRoles
See the periodssettings.readadmin
Change a periodsettings.updateadmin
Check what the next clean-up deletessettings.readadmin
Clean up nowsettings.updateadmin

Screens

Settings → Data retention (a card below the site settings, saved on its own with Update retention): one number field per kind, in days, with "Default N days, at least M." under it. The kinds are grouped by where they come from: SHADE's own first, then each module's under its name (Analytics, Appointments, Shop…), fixed periods last in their group. The defaults follow Dutch law, which is the default for Dutch setups; a business elsewhere follows the law where it operates, and periods per country are still to be built. Toast Retention saved; a period below the minimum shows the server's message under the field.

Check what goes puts a badge next to every kind: Nothing to delete or N to delete, by the saved periods. Clean up now asks first ("Everything older than its period is deleted now … This cannot be undone.") and then says how many records went.

Rules and limits

KindKeyDefaultMinimumCounted from
Email logemail-log907sending
Blocked email addressesemail-suppressions36530the last bounce or complaint
Audit logaudit-log730180the entry (failed sign-ins included)
Error log and security alertserror-log307when an error group last happened; refused-action counts and alerts from when they were recorded (Errors and security alerts)
Form submissionsforms.submissions36530sending (Forms, a module)
Appointmentsappointments.appointments3651the end of the appointment; a booking the visitor didn't confirm goes an hour after it was made
Build hook logbuild-hook-deliveries907the call of the build hook, the site's and other frontends'; each one's newest is always kept (Builds)
Orderscommerce.orders2557 (7 years)2557the order (its lines go with it), not before its newest invoice is as old
Orders never paidcommerce.unpaid-orders9030the order; only failed, expired or cancelled orders without a payment
Paymentspayments.paid2557 (7 years)2557the payment; only paid ones
Payments never paidpayments.unpaid9030the payment; abandoned, failed or expired checkouts
Backups of uninstalled modulesplugin-backups907the uninstall
Webhook delivery logwebhook-deliveries307the delivery (Webhooks)
Channel delivery logchannel-deliveries307the delivery (Channels)
Notifications sentnotifications307the time it was due; planned ones are never deleted
Finished background jobsqueue-jobs71when the job finished, done or given up
Eventsevents71when it happened; kept longer while one of its deliveries still waits
Consent receiptsconsent-receipts1095 (3 years, fixed)—the visitor's choice (Consent banner)
Fiscal records (invoices, credit invoices)fiscal-recordseach record's own date: seven years from the end of the year it was issued (the Dutch term, the default for Dutch setups)—the year it was issued (Privacy)
Accepted terms (a shop's terms, a booking's consent)terms-acceptances2557 (7 years)730 (2 years)when they were accepted (Privacy)
Request protection: stored answersrequest-protection1 (fixed)—the stored checkout answer (rate-limit counts expire on their own)
Expired API tokensexpired-tokens901the day the token expired
API tokens' recent callstoken-requests307the call (at most 10,000 per token are kept, the newest)
Expired sign-ins of team membersexpired-sessions11when the session or sign-in code expired (they hold an IP address and a browser)
Expired website sign-insexpired-account-sessions11when a visitor's session or sign-in code expired
Old versions of pages and entriesversions73030the version (never the latest or the published one, nor one the editorial module's release, schedule or review waits to publish)
Trashtrash301when the entry or media item was deleted; one that something in the trash still uses waits for a later run; until it goes it counts toward the usage limits (Trash)
Finished imports of entriesimport.imports301when the import ended: its result and the rows it could not import, with what the file held for them (Import and export, a module); one still running stays
  • The clean-up runs every hour by itself, as part of the instance's background work. Each kind is cleaned up on its own: a kind that fails is logged and the others still run.
  • A module's kinds are cleaned up also while the module is switched off.
  • What a module keeps in its kv under one of its kinds goes when it was not written within the kind's period; keys a module set to expire go once they have. Both are cleaned up every 15 minutes.
  • Stored periods below a kind's minimum (for example after a module raised it) count as the minimum.
  • Check what goes runs every kind's clean-up and then undoes it: the counts are exact and nothing is deleted. Like Clean up now it is for admins (settings.update): it really runs every clean-up, modules' too, so it is no read. Clean up now does the same as the hourly clean-up, audited as the admin.

Audit entries

ActionWhenSummary
settings.update (target service retention)a period changedChanged how long data is kept (meta: old and new periods)
retention.purge (target retention, id the kind)a clean-up deleted somethingDeleted N records of older than D days (meta: count, days)

The hourly clean-up's entries show System under Who and Through.

For developers

The code and its tests: shade/features/retention/README.md in the shade repository.