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

Async session cache improvements #2713

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Nov 9, 2022

What was wrong?

I believe this closes #2597. That issue is a bit stale so we'll see if it gets re-opened after these changes are in.

How was it fixed?

  • If the loop for a cached async session is closed, or the session itself was closed, create a new session at that cache key and properly close and evict the stale session.

Todo:

Cute Animal Picture

20221102_222308

@fselmo fselmo force-pushed the async-session-cache-improvements branch from 88060df to 5435221 Compare November 9, 2022 20:12
@fselmo fselmo marked this pull request as ready for review November 9, 2022 20:15
- Start and cache a new ``ClientSession`` for a cache key for async if the event loop for the cached session was already closed or if the session itself is closed.
@fselmo fselmo force-pushed the async-session-cache-improvements branch from 5435221 to 2377cb6 Compare November 9, 2022 20:27
@fselmo fselmo requested review from kclowes and pacrob November 9, 2022 20:27
@fselmo fselmo changed the title Session cache improvements Async session cache improvements Nov 9, 2022
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:

@fselmo fselmo merged commit bf96aa0 into ethereum:master Nov 10, 2022
@fselmo fselmo deleted the async-session-cache-improvements branch April 3, 2024 20:50
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

Successfully merging this pull request may close these issues.

Async request session caching incompatible with Flask
2 participants