You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/15 06:38:00 UTC

[GitHub] [incubator-superset] john-bodley opened a new pull request #10887: chore: Using cache factory method

john-bodley opened a new pull request #10887:
URL: https://github.com/apache/incubator-superset/pull/10887


   ### 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.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   
   CI.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on a change in pull request #10887: chore: Using cache factory method

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #10887:
URL: https://github.com/apache/incubator-superset/pull/10887#discussion_r488421520



##########
File path: superset/utils/cache_manager.py
##########
@@ -24,28 +24,24 @@ class CacheManager:
     def __init__(self) -> None:
         super().__init__()
 
-        self._tables_cache = None
-        self._cache = None

Review comment:
       It's interesting that the 
   
   ```python
   @property
   def cache(self) -> Cache:
       return self._cache
   ```
   
   method didn't barf from a MyPy perspective given that `self._cache` is actually `Optional[Cache]`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley merged pull request #10887: chore: Using cache factory method

Posted by GitBox <gi...@apache.org>.
john-bodley merged pull request #10887:
URL: https://github.com/apache/incubator-superset/pull/10887


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on a change in pull request #10887: chore: Using cache factory method

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #10887:
URL: https://github.com/apache/incubator-superset/pull/10887#discussion_r488421520



##########
File path: superset/utils/cache_manager.py
##########
@@ -24,28 +24,24 @@ class CacheManager:
     def __init__(self) -> None:
         super().__init__()
 
-        self._tables_cache = None
-        self._cache = None

Review comment:
       It's interesting that the 
   
   ```python
   @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.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org