Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for expiring items! #470

Open
sancho1952007 opened this issue Mar 12, 2023 · 4 comments
Open

Please add support for expiring items! #470

sancho1952007 opened this issue Mar 12, 2023 · 4 comments

Comments

@sancho1952007
Copy link

Request

Currently No Support For Expiring Items.

This is a very important and required feature any database should have!
I'm planning to build something massive using this database but the only one thing that stopping me do it is expiring items because when you make apps at a scale, you need temporary auth keys, login session IDs, etc. due to which expiration becomes an important factor.

Hope you'll accept my requirement 🤗

@BigBlueHat
Copy link

@sancho1952007 you can write code to manage the expirations yourself. Include timestamps in the keys or build a map/reduce view to output the documents you need to expire--and then remove them accordingly.

@sancho1952007
Copy link
Author

sancho1952007 commented Mar 26, 2023

Yes but you have to use methods like setIntervals() right?

I mean, me and many other developers would prefer something like __expires, expiresIn, __ttl and the number of seconds or something like that. It would be great adding such a feature instead of fetching the whole database just to delete a value.

Especially on a large scale, fetching the database so many times isn't possible!

@BigBlueHat
Copy link

BigBlueHat commented Mar 26, 2023 via email

@sancho1952007
Copy link
Author

Can you show an example of how I can do it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants