-
Notifications
You must be signed in to change notification settings - Fork 154
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
Comments
@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. |
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! |
The view results aren't the whole database. Also, PouchDB isn't a cache...but it sounds like a cache is really what you want.
It's OK to use more than one database. :)
…________________________________
From: Sancho Godinho ***@***.***>
Sent: Saturday, March 25, 2023 11:52:52 PM
To: pouchdb/pouchdb-server ***@***.***>
Cc: Benjamin Young ***@***.***>; Comment ***@***.***>
Subject: Re: [pouchdb/pouchdb-server] Please add support for expiring items! (Issue #470)
Yes but you have to use methods like setIntervals() right?
I mean, me and many other developers would like something like __expires, expires in, __ttl 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!
—
Reply to this email directly, view it on GitHub<#470 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAAKRSJ5JKRLPMFGZIWEJRTW564RJANCNFSM6AAAAAAVYHS6WY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Can you show an example of how I can do it please? |
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 🤗
The text was updated successfully, but these errors were encountered: