-
Website
http://www.benjamingolub.com/ -
Original page
http://benjamingolub.com/2008/05/28/google-app-engine-memcached-ff-to-go-bliss/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Yuvi Panda
2 comments · 6 points
-
EricaJoy
2 comments · 3 points
-
Daniel Ha
1 comment · 396 points
-
m1ck
4 comments · 1 points
-
golfman_story
2 comments · 3 points
-
-
Popular Threads
-
Very disappointed with Sprint - Benjamin Golub
1 week ago · 4 comments
-
test - Benjamin Golub
2 weeks ago · 6 comments
-
Very disappointed with Sprint - Benjamin Golub
For example:
...
key = 'public_%i_%i_%s' % (num, start, service)
response = memcache.get(key)
if not response:
try:
data = f.fetch_public_feed(num=num, start=start, service=service)
except Exception, e:
return HttpResponseRedirect('/%s/' % e)
extra_context = {
'entries': data['entries'],
‘next’: start + num,
}
if start > 0:
extra_context['has_previous'] = True
extra_context['previous'] = start - num
response = render_to_response(’public.html’, extra_context, context_instance=RequestContext(request))
memcache.set(key, response, CACHE_TIME)
return response
But thanks!