diff --git a/CHANGELOG.md b/CHANGELOG.md index d995ea31f..828cd2096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Improvements - Harden reading some nc files ([#1218](../../pull/1218)) - Increase the cache used for opening directories in the pylibtiff source ([#1221](../../pull/1221)) -- Refactor style locking to increase parallelism ([#1224](../../pull/1224)) +- Refactor style locking to increase parallelism ([#1224](../../pull/1224), [#1233](../../pull/1233)) - Better isGeospatial consistency ([#1228](../../pull/1228)) - Better channel handling on frame selector ([#1222](../../pull/1222)) diff --git a/large_image/cache_util/cache.py b/large_image/cache_util/cache.py index e999ea7f2..67de61f3d 100644 --- a/large_image/cache_util/cache.py +++ b/large_image/cache_util/cache.py @@ -228,6 +228,10 @@ def __call__(cls, *args, **kwargs): # noqa - N805 pass raise exc instance._classkey = key + if kwargs.get('style') != getattr(cls, '_unstyledStyle', None): + subkwargs = kwargs.copy() + subkwargs['style'] = getattr(cls, '_unstyledStyle', None) + instance._unstyledInstance = subresult = cls(*args, **subkwargs) with cacheLock: cache[key] = instance return instance