From c1157cff9f6a620d63f79e2c465b1cf0e89c3c33 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 28 Sep 2015 21:45:16 -0700 Subject: bitbake: 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. (Bitbake rev: 3492c1570db9ecd728d9901bda1f02a2d7495f19) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/widgets.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/toaster/toastergui/widgets.py') diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index aaa59c083e..d7d5efdb0f 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/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: -- cgit v1.2.3-54-g00ecf