def delete(self):
redis_search_key = "<STR_LIT::>".join([self.namespace, self.key, "<STR_LIT:*>"])<EOL>keys = self.conn.keys(redis_search_key)<EOL>if keys:<EOL><INDENT>for key in keys:<EOL><INDENT>part = key.split("<STR_LIT::>")[-<NUM_LIT:1>]<EOL>self._data.pop(part)<EOL>self.conn.delete(part)<EOL><DEDENT><DEDENT>del self<EOL>
Deletes all the keys from redis along with emptying the objects
internal `_data` dict, then deleting itself at the end of it all.