Skip to content

Instantly share code, notes, and snippets.

@meeech
Created February 16, 2011 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meeech/829000 to your computer and use it in GitHub Desktop.
Save meeech/829000 to your computer and use it in GitHub Desktop.
babys first python - pretty much copy pasta
token_lookup_key = "token-"+users.get_current_user().user_id();
token = memcache.get(token_lookup_key)
if token is None:
token = channel.create_channel(users.get_current_user().user_id())
memcache.add(token_lookup_key, token, 7200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment