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

set max_len=None or infinite #45

Open
Phil997 opened this issue Nov 26, 2020 · 2 comments
Open

set max_len=None or infinite #45

Phil997 opened this issue Nov 26, 2020 · 2 comments

Comments

@Phil997
Copy link

Phil997 commented Nov 26, 2020

Hello

I want an orderdict that removes a key-value pair after a certain time.
expiringdict is very well suited for this. But I want to add an unlimited number of values.
Is that possible at all?

for example setting the max_len=None
or setting a flag infinite?

Thanks!

@bansalnaman15
Copy link

did you find anything?

@angel-langdon
Copy link

## Easy!

dic = ExpiringDict(max_len=float("inf"), max_age_seconds=1)

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

3 participants