-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
DynamicMap with streams force callback on first lookup after refresh #858
Conversation
@@ -672,7 +673,8 @@ def __getitem__(self, key): | |||
|
|||
# Cache lookup | |||
try: | |||
if util.dimensionless_contents(self.streams, self.kdims): | |||
if (util.dimensionless_contents(self.streams, self.kdims) and | |||
not self._stream_cache_lookup): | |||
raise KeyError('Using dimensionless streams disables DynamicMap cache') |
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.
From our discussion, we think it ought to be something like:
if (util.dimensionless_contents(self.streams, self.kdims)
raise KeyError('Using dimensionless streams disables DynamicMap cache')
elif self._disable_cache_lookup:
raise KeyError('Cache lookup disabled')
That way the variable isn't about streams and you can disable cache lookup on dynamic maps not matter how they are (or aren't) using streams.
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.
I think we decided in the end that it is about streams.
All looks good now! Happy to merge once the tests pass. |
Tests are passing. Merging. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Currently the plotting code will request a particular key from a single DynamicMap multiple times during plotting which should be avoided due to potentially random state.