def thumbnail(key,filename):
if request.if_modified_since:
return "HTTP_304_NOT_MODIFIED", 304
memcache_key = 'thumbnail_{}'.format(key)
data = memcache.get(memcache_key)
if data is None:
data = get_thumbnail(key)
memcache.add(memcache_key, data, 86400 * 30)
return data
评论列表
文章目录