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

Consider adding alru_cache to B019 #488

Open
Stealthii opened this issue Aug 8, 2024 · 1 comment
Open

Consider adding alru_cache to B019 #488

Stealthii opened this issue Aug 8, 2024 · 1 comment

Comments

@Stealthii
Copy link

The async-lru project provides a port for Python's built-in functools.lru_cache function for asyncio.

The same rules apply here with respect to garbage collection on instance methods. As this package is maintained by aio-libs it might be worth considering extending this rule to apply to uses of this decorator.

@cooperlees
Copy link
Collaborator

cooperlees commented Aug 9, 2024

I would accept checking for this in async def functions and recommending. As always, please add tests showing it working and ignoring edge cases etc. we decide not to support etc.

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

No branches or pull requests

2 participants