summaryrefslogtreecommitdiff
path: root/lib/toaster
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-09-28 21:45:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 13:44:47 +0100
commit3492c1570db9ecd728d9901bda1f02a2d7495f19 (patch)
tree452e3d062b913d7c8e110197d56475d6a8032933 /lib/toaster
parent8152db1e35b9a3f35a25f801008f6fc61a6b11c4 (diff)
downloadbitbake-3492c1570db9ecd728d9901bda1f02a2d7495f19.zip
toaster: add nocache option to the ToasterTable widget
Useful for skipping the cache mechanism when debugging. Simply append nocache=true to the end of the url with the table in it. Also adds a debug message if the table is using cached data. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r--lib/toaster/toastergui/widgets.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/widgets.py b/lib/toaster/toastergui/widgets.py
index aaa59c08..d7d5efdb 100644
--- a/lib/toaster/toastergui/widgets.py
+++ b/lib/toaster/toastergui/widgets.py
@@ -253,11 +253,14 @@ class ToasterTable(TemplateView):
search = request.GET.get("search", None)
filters = request.GET.get("filter", None)
orderby = request.GET.get("orderby", None)
+ nocache = request.GET.get("nocache", None)
# Make a unique cache name
cache_name = self.__class__.__name__
for key, val in request.GET.iteritems():
+ if key == 'nocache':
+ continue
cache_name = cache_name + str(key) + str(val)
for key, val in kwargs.iteritems():
@@ -265,6 +268,10 @@ class ToasterTable(TemplateView):
# No special chars allowed in the cache name apart from dash
cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
+
+ if nocache:
+ cache.delete(cache_name)
+
data = cache.get(cache_name)
if data: