static content would be served by web server, need more fast? add a cache 
like varnish ,squid

On Friday, July 13, 2012 9:10:47 PM UTC+8, Andrey Kuzmin wrote:
>
> Its better to serve them through web server, it is possible to do it with 
> either nginx or apache, your webpy should return special header so web 
> server knows which file to send.
>
> nginx: http://wiki.nginx.org/XSendfile
> apache: https://tn123.org/mod_xsendfile/
>
>
> On Friday, July 13, 2012 3:30:58 PM UTC+4, lars wrote:
>>
>>
>>
>> Hi
>> Whats the best way for creating fast non static images request/response?
>> Using 
>> GET(self):
>>    return open('image').read() 
>>
>> uses IO is it better to read and store all the images in a dict and what 
>> is the best buffer to store the images with?
>> images = {}
>> images[image] = open('image').read() 
>>
>> GET(self,image):
>>   return images[image]
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/kogOjWA3HyEJ.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to