def decode(data, colname=None): """Decode data coming out of storage.""" if colname: return utils.decode(data[colname]) return utils.decode(data)
def get(self, url): result = self.client.get('hc-%s' % md5(url).hexdigest()) return decode(result) if result else {}