summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/widgets.py
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 14:11:36 +0100
commitc1157cff9f6a620d63f79e2c465b1cf0e89c3c33 (patch)
treeeb01d8cfcda412b007e8f0e1611dcabd06567138 /bitbake/lib/toaster/toastergui/widgets.py
parent1cafc39e9646458df69a6f6ce91ba804d4999185 (diff)
downloadpoky-c1157cff9f6a620d63f79e2c465b1cf0e89c3c33.tar.gz
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 <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 'bitbake/lib/toaster/toastergui/widgets.py')
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py7
1 files changed, 7 insertions, 0 deletions
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):
253 search = request.GET.get("search", None) 253 search = request.GET.get("search", None)
254 filters = request.GET.get("filter", None) 254 filters = request.GET.get("filter", None)
255 orderby = request.GET.get("orderby", None) 255 orderby = request.GET.get("orderby", None)
256 nocache = request.GET.get("nocache", None)
256 257
257 # Make a unique cache name 258 # Make a unique cache name
258 cache_name = self.__class__.__name__ 259 cache_name = self.__class__.__name__
259 260
260 for key, val in request.GET.iteritems(): 261 for key, val in request.GET.iteritems():
262 if key == 'nocache':
263 continue
261 cache_name = cache_name + str(key) + str(val) 264 cache_name = cache_name + str(key) + str(val)
262 265
263 for key, val in kwargs.iteritems(): 266 for key, val in kwargs.iteritems():
@@ -265,6 +268,10 @@ class ToasterTable(TemplateView):
265 268
266 # No special chars allowed in the cache name apart from dash 269 # No special chars allowed in the cache name apart from dash
267 cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name) 270 cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
271
272 if nocache:
273 cache.delete(cache_name)
274
268 data = cache.get(cache_name) 275 data = cache.get(cache_name)
269 276
270 if data: 277 if data: