Hi I wanted to create a appwrite document that expires after a hour. Would that be possible that it automatically deletes it self at Appwrite itself? Or do I have to manually code this feuture and for loop each time to check if there are not expirations. Maybe queries would work to check for a certain time stamp. But it would be nice if it would be possible to use TTL
I think, right now, the only way to achieve this is to create a function that runs every hour and checks for expired documents and deletes them.
There is a PR out to add that functionality to the function templates. But you should be fine to grap this code and make it your own function. https://github.com/appwrite/templates/pull/238/files
You may have to alter it slightly to support hours instead of just days.
Recommended threads
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126