fix: cache TTL silently degrades when fetched_at is None #6

Open
opened 2026-05-30 01:22:30 +00:00 by GKaszewski · 0 comments
Owner

RemoteActor.fetched_at is Option<DateTime<Utc>> for backwards compatibility — None is treated as always-fresh. This means consumers who don't populate the field get no TTL benefit at all, silently.

Options:

  • Make fetched_at required (breaking) — forces consumers to handle it
  • Treat None as always-stale instead of always-fresh — safer default but more refetches
  • Log a warning on first None encounter so consumers notice
`RemoteActor.fetched_at` is `Option<DateTime<Utc>>` for backwards compatibility — `None` is treated as always-fresh. This means consumers who don't populate the field get no TTL benefit at all, silently. Options: - Make `fetched_at` required (breaking) — forces consumers to handle it - Treat `None` as always-stale instead of always-fresh — safer default but more refetches - Log a warning on first `None` encounter so consumers notice
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-ap#6