Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
deepsun
· 4mo ago · 0 comments
And Redis has auto-delete rows (aka TTL). In Postgres you need a cron job to clear stale rows.
Comments
[–]
samuelknight
4mo ago
You can create an index on an expires_at column and opportunistically DELETE on each write to the cache table.
[–]
pooloo
4mo ago
This is one way to handle the problem, but not the only...