Oddbean new post about | logout
 It doesn’t but I’m sure you could write a little sidecar program or make a fork and add a bit for garbage collection.  
 Come to think of it, might be a fun project for nostr-rs-relay too. It’s super lightweight and already used SQLite for storage.  
 I've thought about using nostr-rs-relay with a sidecar, but the issue is tracking what events where last used (sent). I'm not sure how to do that 
 ahh, yeah ok - that makes sense. 

Had a quick look at nostr-rs-relay and it looks like all you'd really need is to add a new column to the database to store the last accessed time of the stored event. 

Then you could easily have a background task that ran to clean up. The methods that touch the events would just need to update that field every time the event is returned in a REQed. You'd have to spend a bit of time to make sure you optimized how to do that write... but feels doable to me.