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 is readline library?

715


What is a verbatim string literal and why do we use it?

707


In .NET which is the smallest unit of execution?

843


What is the default value of decimal in c#?

689


What is object pool in .net?

712


Can an array be null c#?

719


What is final keyword in c#?

700


What is indexer c#?

651


what is method overloading in c#?

764


What is xor operator in c#?

712


Can dictionary have duplicate keys c#?

682


What is assembly and dll in c#?

658


What is difference between float and decimal?

730


Why do we need abstract class?

659


What are methods c#?

657