Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (13 sloc) 359 Bytes
from google.appengine.api import memcache
from googlevoice import Voice
VOICE_KEY = 'voice_instance'
# Returned a logged in instance of a voice object
def get_voice():
v = Voice()
serialized = memcache.get(VOICE_KEY)
if not serialized is None:
return v
memcache.set(VOICE_KEY, v.to_json())
return v