instantdb / instant

Instant is a modern Firebase. We make you productive by giving your frontend a real-time database.
https://instantdb.com
Apache License 2.0
6.7k stars 184 forks source link

[Feature Request] Adding TTL to records #253

Open MrMagicPickle opened 2 months ago

MrMagicPickle commented 2 months ago

Hello, I'd like to request to add an easy means of adding TTL to our records so that they can be automatically deleted after they reach an expiry datetime.

The reason I am proposing this is because:

I foresee that one of the common usecase for applications that use instantDB would be to create a quick realtime collaborative environment as a one-time-use, but then never re-visit it again. For example: multiplayer lobby games, temporary file sharing links, online polls/surveys, etc.

xavierchow commented 1 month ago

+1 Having an expiration property on the records would be helpful and convenient.