@cache_manager.cache(expire=<NUM_LIT> * <NUM_LIT> * <NUM_LIT>)  <EOL>def lookup_api_key_info():
info = {}<EOL>with db_connect() as conn:<EOL><INDENT>with conn.cursor() as cursor:<EOL><INDENT>cursor.execute(ALL_KEY_INFO_SQL_STMT)<EOL>for row in cursor.fetchall():<EOL><INDENT>id, key, name, groups = row<EOL>user_id = "<STR_LIT>".format(id)<EOL>info[key] = dict(id=id, user_id=user_id,<EOL>name=name, groups=groups)<EOL><DEDENT><DEDENT><DEDENT>return info<EOL>
Given a dbapi cursor, lookup all the api keys and their information.