Marc-André Bombeck
ba4e34f09e
Tag the briefing cache with its language and refuse a foreign one
...
The comprehensive-briefing cache (User.insightsCachedText) is one slot
per account with no record of the language it was written in. Every
reader served whatever was there, so a German-language account whose
nightly warm had written English kept seeing English on the dashboard
lead and the Today briefing. The request path only replaced it once the
row was a day old and the provider answered, which with a provider at
its usage limit was never.
Add User.insightsCachedLocale (migration 0335). Both writers store the
locale they generated in; the timestamp-only refresh on an unchanged
snapshot tags the row too, since the fingerprint covers the generation
locale. Every reset that nulls the text nulls the tag.
The snapshot briefing lift and GET /api/insights/generate treat a tag
that differs from the reader's locale as an empty cache: no prose, no
timestamp, the preparing / no-provider state, and the out-of-band warm
enqueued in the reader's locale through the existing path. The
generator's own short-circuit and the POST short-circuit refuse to call
a foreign-language row fresh. A NULL tag (rows written before this
change) is served as before until the next write tags it. The Today
digest derives from the snapshot and follows.
Covered by unit tests on the lift, the route and the generator, and an
integration test that writes the row through Prisma and reads the
snapshot for a reader in another language.
2026-09-02 10:44:03 +02:00
..
2026-05-17 13:22:51 +02:00
2026-05-17 23:08:17 +02:00
2026-05-21 07:39:10 +02:00
2026-05-21 07:39:10 +02:00
2026-05-21 07:39:10 +02:00
2026-05-21 11:20:24 +02:00
2026-05-21 12:48:02 +02:00
2026-05-21 23:13:21 +02:00
2026-05-22 09:18:52 +02:00
2026-05-22 09:18:52 +02:00
2026-05-22 09:18:52 +02:00
2026-05-23 12:51:41 +02:00
2026-05-23 12:51:41 +02:00
2026-05-28 07:52:11 +02:00
2026-05-28 19:33:11 +02:00
2026-05-28 22:32:18 +02:00
2026-05-28 22:32:40 +02:00
2026-05-28 22:39:20 +02:00
2026-05-28 23:38:21 +02:00
2026-05-29 22:07:10 +02:00
2026-05-30 00:10:12 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-05-31 14:36:17 +02:00
2026-06-01 17:31:45 +02:00
2026-06-01 20:25:34 +02:00
2026-06-01 20:25:34 +02:00
2026-06-01 20:25:42 +02:00
2026-06-01 23:24:10 +02:00
2026-06-02 16:45:23 +02:00
2026-06-02 22:02:50 +02:00
2026-06-02 22:07:28 +02:00
2026-06-02 23:43:22 +02:00
2026-06-02 22:02:46 +02:00
2026-06-02 22:49:43 +02:00
2026-06-03 19:31:16 +02:00
2026-06-04 00:49:31 +02:00
2026-06-04 00:49:31 +02:00
2026-06-04 00:50:13 +02:00
2026-06-04 01:21:42 +02:00
2026-06-04 03:38:19 +02:00
2026-06-04 09:29:49 +02:00
2026-06-04 10:11:19 +02:00
2026-06-04 21:02:10 +02:00
2026-06-04 22:36:58 +02:00
2026-06-05 01:05:47 +02:00
2026-06-05 01:07:27 +02:00
2026-06-05 03:01:36 +02:00
2026-06-05 03:01:36 +02:00
2026-06-05 03:01:36 +02:00
2026-06-05 08:10:13 +02:00
2026-06-05 14:45:58 +02:00
2026-06-05 15:28:47 +02:00
2026-06-05 20:50:05 +02:00
2026-06-06 08:19:32 +02:00
2026-06-06 08:19:32 +02:00
2026-06-06 08:19:32 +02:00
2026-06-06 11:49:23 +02:00
2026-06-06 08:57:12 +02:00
2026-06-06 12:39:28 +02:00
2026-06-06 16:54:43 +02:00
2026-06-07 13:26:41 +02:00
2026-06-07 19:23:59 +02:00
2026-06-08 18:29:05 +02:00
2026-06-10 13:34:46 +02:00
2026-06-10 15:40:48 +02:00
2026-06-10 15:40:48 +02:00
2026-06-10 15:40:48 +02:00
2026-06-10 16:18:48 +02:00
2026-06-10 16:18:48 +02:00
2026-06-10 22:21:44 +02:00
2026-06-11 00:10:01 +02:00
2026-06-11 11:45:58 +02:00
2026-06-11 13:57:15 +02:00
2026-06-11 21:17:05 +02:00
2026-06-12 17:42:31 +02:00
2026-06-12 18:10:21 +02:00
2026-06-12 21:04:09 +02:00
2026-06-12 22:03:01 +02:00
2026-06-12 22:56:03 +02:00
2026-06-13 16:07:50 +02:00
2026-06-14 10:29:22 +02:00
2026-06-14 15:04:25 +02:00
2026-06-14 15:23:26 +02:00
2026-06-14 17:19:09 +02:00
2026-06-14 17:42:00 +02:00
2026-06-14 21:23:56 +02:00
2026-06-14 20:58:49 +02:00
2026-06-15 01:49:28 +02:00
2026-06-14 23:20:54 +02:00
2026-06-14 23:22:52 +02:00
2026-06-15 00:09:33 +02:00
2026-06-15 00:07:30 +02:00
2026-06-15 20:53:46 +02:00
2026-06-15 22:44:35 +02:00
2026-06-16 20:36:13 +02:00
2026-06-16 23:11:08 +02:00
2026-06-16 23:11:08 +02:00
2026-06-16 23:11:08 +02:00
2026-06-18 19:27:28 +02:00
2026-06-18 20:17:13 +02:00
2026-06-18 21:37:13 +02:00
2026-06-18 22:05:17 +02:00
2026-06-18 22:41:47 +02:00
2026-06-19 20:52:31 +02:00
2026-06-19 21:25:22 +02:00
2026-06-19 22:07:46 +02:00
2026-06-20 11:17:43 +02:00
2026-06-20 11:58:58 +02:00
2026-06-20 16:52:19 +02:00
2026-06-20 16:50:06 +02:00
2026-06-21 10:22:29 +02:00
2026-06-21 10:44:15 +02:00
2026-06-21 21:06:17 +02:00
2026-06-21 21:06:09 +02:00
2026-06-21 21:06:42 +02:00
2026-06-22 07:01:42 +02:00
2026-06-22 07:20:41 +02:00
2026-06-26 12:05:49 +02:00
2026-06-26 13:24:30 +02:00
2026-06-27 01:25:35 +02:00
2026-06-27 12:48:48 +02:00
2026-06-27 13:37:50 +02:00
2026-06-27 15:46:03 +02:00
2026-06-27 15:46:03 +02:00
2026-06-27 19:33:10 +02:00
2026-06-27 19:33:10 +02:00
2026-06-27 19:33:10 +02:00
2026-06-27 19:56:16 +02:00
2026-06-27 20:34:31 +02:00
2026-06-27 21:49:39 +02:00
2026-06-27 20:37:35 +02:00
2026-06-28 00:52:04 +02:00
2026-06-28 00:52:04 +02:00
2026-06-28 03:05:10 +02:00
2026-06-28 03:07:15 +02:00
2026-06-28 03:28:37 +02:00
2026-06-28 15:47:39 +02:00
2026-06-28 15:47:25 +02:00
2026-06-28 16:02:54 +02:00
2026-06-28 16:02:54 +02:00
2026-06-28 16:58:13 +02:00
2026-06-28 16:56:54 +02:00
2026-06-28 17:35:45 +02:00
2026-06-28 18:12:51 +02:00
2026-06-28 19:06:21 +02:00
2026-06-29 00:37:39 +02:00
2026-06-30 08:59:44 +02:00
2026-07-03 14:13:06 +02:00
2026-07-05 14:54:17 +02:00
2026-07-05 20:33:29 +02:00
2026-07-07 11:04:31 +02:00
2026-07-07 18:08:12 +02:00
2026-07-07 18:34:58 +02:00
2026-07-09 02:34:06 +02:00
2026-07-09 10:32:59 +02:00
2026-07-09 12:45:50 +02:00
2026-07-09 21:25:25 +02:00
2026-07-09 23:29:06 +02:00
2026-07-10 00:10:56 +02:00
2026-07-10 01:15:32 +02:00
2026-07-10 02:08:03 +02:00
2026-07-10 21:23:00 +02:00
2026-07-11 00:18:23 +02:00
2026-07-14 11:43:53 +02:00
2026-07-14 13:10:47 +02:00
2026-07-15 22:07:25 +02:00
2026-07-16 06:47:36 +02:00
2026-07-16 22:57:27 +02:00
2026-07-16 23:32:28 +02:00
2026-07-17 14:28:56 +02:00
2026-07-17 14:29:07 +02:00
2026-07-17 16:08:39 +02:00
2026-07-17 17:46:28 +02:00
2026-07-17 23:12:12 +02:00
2026-07-18 16:50:56 +02:00
2026-07-18 18:04:26 +02:00
2026-07-19 10:01:06 +02:00
2026-07-19 11:41:12 +02:00
2026-07-19 13:01:45 +02:00
2026-07-19 13:17:34 +02:00
2026-07-19 13:47:25 +02:00
2026-07-20 00:40:20 +02:00
2026-07-20 00:40:20 +02:00
2026-07-20 00:40:20 +02:00
2026-07-21 13:08:28 +02:00
2026-07-22 04:14:15 +02:00
2026-07-22 04:14:15 +02:00
2026-07-22 04:14:15 +02:00
2026-07-23 09:16:03 +02:00
2026-07-24 02:28:51 +02:00
2026-07-24 03:50:14 +02:00
2026-07-25 06:15:37 +02:00
2026-07-25 11:36:18 +02:00
2026-07-25 15:03:44 +02:00
2026-07-25 18:41:40 +02:00
2026-07-25 21:23:26 +02:00
2026-07-26 00:46:03 +02:00
2026-07-26 14:04:56 +02:00
2026-07-26 14:19:26 +02:00
2026-07-26 16:37:21 +02:00
2026-07-26 18:00:20 +02:00
2026-07-26 22:27:48 +02:00
2026-07-27 14:35:33 +02:00
2026-07-27 23:00:19 +02:00
2026-07-28 21:11:43 +02:00
2026-07-28 14:01:11 +02:00
2026-07-28 14:01:11 +02:00
2026-07-29 14:49:12 +02:00
2026-07-31 08:06:07 +02:00
2026-07-31 15:01:23 +02:00
2026-07-31 15:38:50 +02:00
2026-08-01 19:19:01 +02:00
2026-08-02 10:03:04 +02:00
2026-08-02 11:31:41 +02:00
2026-08-02 13:04:25 +02:00
2026-08-02 16:36:12 +02:00
2026-08-04 17:11:40 +02:00
2026-08-06 02:28:56 +02:00
2026-08-06 04:38:09 +02:00
2026-08-06 02:00:35 +02:00
2026-08-06 09:42:47 +02:00
2026-08-06 14:05:59 +02:00
2026-08-06 20:48:50 +02:00
2026-08-07 21:40:41 +02:00
2026-08-08 01:03:05 +02:00
2026-08-08 06:51:42 +02:00
2026-08-08 11:10:25 +02:00
2026-08-08 07:14:02 +02:00
2026-08-08 15:17:05 +02:00
2026-08-08 13:35:03 +02:00
2026-08-10 05:32:58 +02:00
2026-08-10 07:58:48 +02:00
2026-08-13 12:40:50 +02:00
2026-08-14 08:54:43 +02:00
2026-09-02 10:44:03 +02:00