You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when we open a source, the style is fixed on open. This has virtues for caching and parallel threads serving tiles with the same style. However, in some environments (e.g., Jupyter, Trame), there is a single user and no benefit is gained from this caching. In these cases, it would be nice is style was a setter. However, just calling _setStyle will cause issues with the cache.
One approach to resolve this is to add a tile source creation option that would bypass the cache. It would use create a new class instance as is done with a cache miss, duplicating the unstyled class, but would not place the result into the cache. This would guarantee that changing the style would not alter class instances held by other threads. We could add adjustableStyle as parameter, that, if set, would do this cache bypass. It would also set flag on the class to allow use of a style setter. This setter could throw an exception if the style was not adjustable explaining how to open the class so that it is adjustable.
Further, if the adjustableStyle could have a default value from the config, then for examples in Jupyter or Trame we could set this config value and the casual user could then adjust styles without creating new source instances or remembering to pass the appropriate flag.
The text was updated successfully, but these errors were encountered:
When opening a tile source, pass `noCache=True`. In this mode, the tile
source can directly have its style modified (e.g., `source.style = <new
value>`). This is also used when importing images into girder to avoid
flushing the cache of tile sources that are in active use.
This closes#1294.
This closes#1145.
There is a config value `cache_sources`, that, if False, makes `noCache`
default to False.
This closes#1206.
Currently, when we open a source, the style is fixed on open. This has virtues for caching and parallel threads serving tiles with the same style. However, in some environments (e.g., Jupyter, Trame), there is a single user and no benefit is gained from this caching. In these cases, it would be nice is
style
was a setter. However, just calling_setStyle
will cause issues with the cache.One approach to resolve this is to add a tile source creation option that would bypass the cache. It would use create a new class instance as is done with a cache miss, duplicating the unstyled class, but would not place the result into the cache. This would guarantee that changing the style would not alter class instances held by other threads. We could add
adjustableStyle
as parameter, that, if set, would do this cache bypass. It would also set flag on the class to allow use of astyle
setter. This setter could throw an exception if the style was not adjustable explaining how to open the class so that it is adjustable.Further, if the
adjustableStyle
could have a default value from the config, then for examples in Jupyter or Trame we could set this config value and the casual user could then adjust styles without creating new source instances or remembering to pass the appropriate flag.The text was updated successfully, but these errors were encountered: