Hacker News new | ask | show | jobs
by sgarland 2 days ago
Those examples are all equally difficult to reason about. Cache invalidation is equivalent to refreshing a materialized view, and UNLOGGED tables bring about new and exciting ways lose data.
1 comments

Cache invalidation on Redis is setting a TTL of 60s on the kv I just set, in a single atomic operation.
You can also pg_cron refresh a materialised view every minute which seems similar.