From 05ca4132f17a581939fd0b206319f215248e5232 Mon Sep 17 00:00:00 2001 From: George Steel Date: Sat, 27 Apr 2024 14:16:18 -0400 Subject: Add option to disable the stitch plan cache (#2655) Setting the cache size to 0 bypasses the cache completely. This is necessary during development to ensure newly-changed code actually gets run. Also fixes the error pane in the params gui. * make params warning pane large enough to see contents * rename sizers in preferences dialog descriptive names * add shapely version bound * add option to disable stitch plan cache * remove out-of-date wxg file * make a cache size of 0 disable the cache --- lib/utils/cache.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/utils/cache.py') diff --git a/lib/utils/cache.py b/lib/utils/cache.py index 1ede8ce1..543aaf15 100644 --- a/lib/utils/cache.py +++ b/lib/utils/cache.py @@ -39,6 +39,10 @@ def get_stitch_plan_cache(): return __stitch_plan_cache +def is_cache_disabled(): + return not global_settings['cache_size'] + + class CacheKeyGenerator(object): """Generate cache keys given arbitrary data. -- cgit v1.2.3