Last post Aug 16, 2017 10:29 PM by EnenDaveyBoy
Aug 14, 2017 03:26 PM|enendaveyboy|LINK
I have started using this for globalization for me model information:
using the database setup
now i am building a cms, and i like the easy in which i can add a helper to be able to build a UI, i like how easy it is to understand, and I have started thinking (actually i have one build for testing product titles and descriptions) about taking it further
and building something similar for all the text in the cms, mainly because when i do includes using the entity framework it includes all the files even if i just need one for things like text and globalization, things like product description etc.
My main worry is the effects on the database, i mean i could be hitting one of the resource providers 100, maybe 1000 times per page, taking into account everything on the page, the cms will have articles, products forums and all the usual web stuff.
The models are fairly complicated, and this will reduce the initial database call considerably, and all the calls to the database will return a very small entity, although all lookups will use navigation properties to get the right file.
So the questions are, if i keep this method will it cause issues with the database if i don't use cache? will the cache be big and break the website? which one would be recommended cache or database? is there anything i need to be careful of? and am i over
worrying about this?
(when i say database or cache, i know i will need to use the database when using cache but i mean using cache for storage after the initial lookup)
Any information would be appriciated.
Aug 15, 2017 12:21 AM|bruce (sqlwork.com)|LINK
a database query take 5-15 milliseconds minimum. a 1000 hits a page, would be a real performance hit. You should cache. How much depends on the performance you want, howbig the items are, and how much server memory you have.
it would not be unreasonable to have a couple gigs of cache. You would like to get to 95-98% cached.
if it is a small CMS (thousands of pages) another option is cache the output html.
Aug 16, 2017 10:29 PM|enendaveyboy|LINK
i am able to use the same cache in the example, although I have had to make the string longer which identifies the cached item, most of the values will be relatively small 50 characters or less, only desciptions will be large.
done some thinking and i think it would be less than 1000 hits, taking into mind, even on a catalogue page with almost everything i doubt it will be 1000, the main products, recommendations etc etc.
will look at page cache and other methods later.
memory will be purchased as required for good performance, i guess its easy enough to switch between cached and not on the example.
Many thanks for the information.