Re: [Cppcms-users] Caching files
Brought to you by:
artyom-beilis
|
From: Marcel H. <ke...@co...> - 2013-12-04 11:27:05
|
Google: cppcms serving static files http://cppcms.com/wikipp/en/page/cppcms_1x_serving_static_files On 04.12.2013 12:13, Shiv Shankar Dayal wrote: > Hi, > > Suppose I am making few online game the clearly it is going to involve > some media. Let us say I have 2GB of artwork which will remain > constant. Is is not better that when the application starts then load > all these files in memory and serve from there to users rather than > putting them in database and doing a caching. Why do you put static files (pictures, etc) in a database?! I said it already. Don't! > > I think it is much better to load from raw filesystem and keep then in > memory in application and serve from there. The only thing which is > going to happen is when app will start it will take time. But it is > much better than async io because we know how much data we have before > hand and 2G or something like even 10G data is not much as far as > keeping that in memory is concerned. Yep. As the link above says, let the webserver do its job! > > Please note that this is static data will never change so can be kept > in const global buffers. Please share your opinions. > > -- |