From 93c54c2f9d708727116451a346b13e7e5a74577e Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Thu, 18 Jun 2015 14:11:28 +0100 Subject: bitbake: toaster: Enable toastertable cache Enable the cache and fix warning on the toastertable cache which happens on the memcache backend "CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached" (Bitbake rev: 330692e4e2e4dea59f70caa03001905ffff4860a) Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/widgets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (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 f5a1b3e7b9..e257c702eb 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py @@ -36,6 +36,7 @@ import types import json import collections import operator +import re from toastergui.views import objtojson @@ -251,10 +252,12 @@ class ToasterTable(TemplateView): for key, val in kwargs.iteritems(): cache_name = cache_name + str(key) + str(val) + # No special chars allowed in the cache name + cache_name = re.sub(r'[^A-Za-z0-9]', "", cache_name) data = cache.get(cache_name) - #if data: - # return data + if data: + return data self.setup_columns(**kwargs) -- cgit v1.2.3-54-g00ecf