Community Page
- benjamingolub.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- What I can say is very nice and helpful as well as informative post...really help me very much more!! Thanks.. Cheers, <a href="http://sain-web.com" rel="nofollow">Buat...
- That's a great tip. Thanks for sharing. Darek from <a href="http://www.informationex.com">Free ad web service</a>
- Just testing
- Great post Thanks
- This is a very fantastic effect, thank you
Jump to original thread »
Google App Engine gained support for memcached today, a very high performance caching system, and I’m already using it in FF To Go.
I’ll share some code with you so you know how it works. This is the code that renders the public feed:
def public(request):
f = friendfeed.FriendFeed()
try:
[...] ... Continue reading »
I’ll share some code with you so you know how it works. This is the code that renders the public feed:
def public(request):
f = friendfeed.FriendFeed()
try:
[...] ... Continue reading »
1 year ago
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
1 year ago
1 year ago
But thanks!
1 year ago