bitbake: bitbake: toastergui: Toastertables don't replace dash in cache key

The dash character was being stripped from the cache key when we sanitise
it for the memcache backend. This meant that we were getting a false hit
on the cache and returning non descending results which are indicated by
the dash prefix on the field name.

(Bitbake rev: 18743274a94966d2cd8d17d163e4dbab501a8a52)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2015-07-28 15:24:40 +01:00
committed by Richard Purdie
parent 6520feb4ab
commit e68370cbf1

View File

@@ -252,8 +252,8 @@ 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)
# No special chars allowed in the cache name apart from dash
cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
data = cache.get(cache_name)
if data: