diff options
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/toolbar/loader.py | 3 | ||||
| -rw-r--r-- | debug_toolbar/utils/settings.py | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py index 870eec3..f9262f8 100644 --- a/debug_toolbar/toolbar/loader.py +++ b/debug_toolbar/toolbar/loader.py @@ -100,7 +100,6 @@ def load_panel_classes(): toolbar_counter = 0 -toolbar_maxsize = 10 # keep data for the last 10 requests toolbar_results = SortedDict() @@ -108,7 +107,7 @@ def save_toolbar(toolbar): global toolbar_counter, toolbar_results toolbar_counter += 1 toolbar_results[toolbar_counter] = toolbar - for _ in range(len(toolbar_results) - toolbar_maxsize): + for _ in range(len(toolbar_results) - CONFIG['RESULTS_CACHE_SIZE']): # When we drop support for Python 2.6 and switch to # collections.OrderedDict, use popitem(last=False). del toolbar_results[toolbar_results.keyOrder[0]] diff --git a/debug_toolbar/utils/settings.py b/debug_toolbar/utils/settings.py index af9821f..12dc231 100644 --- a/debug_toolbar/utils/settings.py +++ b/debug_toolbar/utils/settings.py @@ -20,6 +20,7 @@ CONFIG_DEFAULTS = { ), 'ROOT_TAG_ATTRS': '', 'SQL_WARNING_THRESHOLD': 500, # milliseconds + 'RESULTS_CACHE_SIZE': 10, } |
