8000 Update memcache example to invalidate cache after new message posted. · theacodes/python-docs-samples@81f55f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 81f55f6

Browse files
committed
Update memcache example to invalidate cache after new message posted.
1 parent ff35c33 commit 81f55f6

File tree

1 file changed

+1
-0
lines changed
  • appengine/memcache/guestbook

1 file changed

+1
-0
lines changed

appengine/memcache/guestbook/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def post(self):
127127

128128
greeting.content = self.request.get('content')
129129
greeting.put()
130+
memcache.delete('{}:greetings'.format(guestbook_name))
130131
self.redirect('/?' +
131132
urllib.urlencode({'guestbook_name': guestbook_name}))
132133

0 commit comments

Comments
 (0)
0