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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...