Expires
Thank you for this great package!
What do these changes do?
This change adds keyword argument expires as discussed in https://github.com/aio-libs/async_lru/pull/50#issuecomment-487609639. In comparison with the other implementation this removes the key from the cache immediately after expires time passes. This way it saves the space earlier and we don't have to deal with special cases with maxsize (if we don't call the coroutine with the same arguments again the already expired item would take place in _cache forever or until it is removed by least recently used principle.
Are there changes in behavior for the user?
Everything behaves in the same manner plus user can use the new keyword argument.
Related issue number
This PR has no issue number.
Checklist
- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
Please read https://github.com/aio-libs/async_lru/pull/50#issuecomment-488439057
I updated the PR so it passes code style check. @hellysmile what do you think about arguments I stated in https://github.com/aio-libs/async_lru/pull/50#issuecomment-488565406?
Codecov Report
Merging #131 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #131 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 136 138 +2
Branches 24 25 +1
=====================================
+ Hits 136 138 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| async_lru.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update ba653e8...d2e085f. Read the comment docs.
Hello. Is this ever going to be merged?
Would love to see this merged as well!
I don't think this will get ever merged. We forked the repo and released it in our internal system.
@Artimi any plans to publish to pypi?
No, we have it locally and we don't want to maintain the package.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Petr Šebek seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Implemented by c46ada7