-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
chore: Using cache factory method #10887
chore: Using cache factory method #10887
Conversation
@@ -24,28 +24,24 @@ class CacheManager: | |||
def __init__(self) -> None: | |||
super().__init__() | |||
|
|||
self._tables_cache = None | |||
self._cache = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting that the
@property
def cache(self) -> Cache:
return self._cache
method didn't barf from a MyPy perspective given that self._cache
is actually Optional[Cache]
per the definition on line 28.
c573cb9
to
5f25d09
Compare
5f25d09
to
dc79c53
Compare
dc79c53
to
d3eea2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice cleanup!
Co-authored-by: John Bodley <[email protected]>
SUMMARY
Switching the cache manager to use the factory method which allows the cache to be used within blueprints et al. prior to being bound to the application. This approach is also a step in the preferred direction, i.e., away from the legacy configuration defined here.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
CI.
ADDITIONAL INFORMATION