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 problem does Delegate Solve?

773


What is join in c#?

695


What is the difference between array and list in c#?

678


what is difference between destruct or and garbage collection ?

718


How to generate strong name key file or which command is used to generated strong name key file?

748


What is msil, and why should developers need an appreciation of it if at all?

831


Does c# have a 'throws' clause?

795


What is the diff between System.String and System.Text.StringBuilder classes?

774


What is int16?

720


What are c# attributes and its significance?

728


What is meant by unicode characters?

771


How do you clear a list in c#?

694


What is datacontract in c#?

681


What is a race condition?

683


Why do we use delegates?

646