Skip to content

Delete expired token from db #393

Discussion options

You must be logged in to vote

Hey! I think TTL indexes will work in your case. You can add it using IndexModel: https://beanie-odm.dev/tutorial/indexes/#multi-field-indexes . Here is the MongoDB doc about TTL indexes: https://www.mongodb.com/docs/manual/core/index-ttl/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by diegocgaona
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants