Add app-local caching and stop using memcache; reduce overall datastore access.

This commit is contained in:
Ian Gulliver
2014-05-28 14:44:13 -07:00
parent 9736c15faa
commit a70982243b
4 changed files with 25 additions and 13 deletions

5
api.py
View File

@@ -54,6 +54,11 @@ def CreateChannel(google_user, client, instance_id, args):
def Pin(google_user, client, instance_id, args):
instance = models.Instance.FromID(instance_id)
if not instance or not instance.active:
# Probably a race with the channel opening
return {
'result': 'retry',
}
subject = args['subject']
message = args['message']