def items(self): for item in self.cursor.execute( """SELECT key, value from {tb};""".format(tb=self._current_table)): yield (item[0], marshal.loads(item[1])) for k, v in self.current_cache.items(): yield k, v