[bitbake-devel] [PATCH 17/23] toaster: Enable toastertable cache
Alex DAMIAN
alexandru.damian at intel.com
Thu Jun 25 10:33:54 UTC 2015
From: Michael Wood <michael.g.wood at intel.com>
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"
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
lib/toaster/toastergui/widgets.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/toaster/toastergui/widgets.py b/lib/toaster/toastergui/widgets.py
index f5a1b3e..e257c70 100644
--- a/lib/toaster/toastergui/widgets.py
+++ b/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)
--
1.9.1
More information about the bitbake-devel
mailing list