def cache_userdata(userterm, username, channel_id):
 userterm = ''.join([t.strip().lower() for t in userterm.split(' ')])
 g.username_query_cache[userterm] = (username, channel_id)
 util.dbg('Cache data for username search query "{}": {} ({})'.format(userterm, username, channel_id))
 while (len(g.username_query_cache) > 300):
  g.username_query_cache.popitem(last=False)
 return (username, channel_id)

def cache_userdata ( userterm , username , channel_id ) : userterm = '' . join ( [ t . strip ( ) . lower ( ) for t in userterm . split ( ' ' ) ] ) g . username_query_cache [ userterm ] = ( username , channel_id ) util . dbg ( 'Cache data for username search query "{}": {} ({})' . format ( userterm , username , channel_id ) ) while ( len ( g . username_query_cache ) > 300 ) : g . username_query_cache . popitem ( last = False ) return ( username , channel_id )
cache user name and channel id tuple .