How cache is implemented in web application for DB queries?

Answer Posted / amar&venky

1)Memory or disk caching can be used directly to avoid running duplicate queries. A complex data report, for example, can have its result sets serialized to disk for reuse in multiple page templates. Caching has its own overhead, such as the expense of reading and parsing data on disk, so simple and inexpensive queries are most often best left for the database to process.
2)ORM modules can be built to retain objects in memory. For the first request, the data object is loaded into memory. Any updates or further requests can be managed in memory, with data written back to the database immediately or later, such as during system shutdown. In this way the ORM is effectively a buffer between the web application logic and the database server.
3)Caching partial page content can help avoid rerunning queries when that content is required multiple times.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of c#?

506


How do I create a single-file assembly?

479


What is the use of console application in c#?

477


What is out int in c#?

480


2. What happened when BO object has been called?

1534






What’s a strong name?

523


Define delay signing?

530


Is there any sample c# code for simple threading?

563


Can we create multiple constructors?

489


What do you mean by parsing and how to parse a date time string in c#?

521


What is the difference between a constant and a static readonly field?

530


What is multidimensional array in c#?

462


What are the steps for creating clr trigger

565


What are generics in c#.net?

608


Is for loop faster than foreach?

529