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
What is the use of expression tree in c#?
What is the default modifier for class in c#?
Is c# a strongly-typed language?
Can hashtable have duplicate keys in c#?
What are the 2 broad classifications of fields in c#?
In .Net, what is an assembly? Also explain the type of assembly.
Why do we use yield in c#?
Explain how many types of exception handlers are there in .net?
What are the problem with .NET generics?
What is difference between array and list?
What is hierarchical inheritance in c#?
Write a syntax for writing a event delegate.
what is the Difference between the public and private ?
How many variables do you need?
What the different phase/steps of acquiring a proxy object in webservice?