Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
neoden
6 months ago
|
parent
|
context
|
favorite
| on:
Redis is fast – I'll cache in Postgres
One could use a trigger for this. All we need is to setup a trigger that would delete all expired records looking at some timestamp column on update. That would eat up some latency but as was said, most projects would find it good enough anyway.
dmitry-vsl
6 months ago
|
next
[–]
Probably better to use partitioned table and drop old partitions.
nhumrich
6 months ago
|
prev
[–]
I use pg cron for this. But I don't have a need for TTL to be to the minute accurate, or even to the hour.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: