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
Is java better than c sharp?
Why do we need collections in c#?
How do namespaces work?
Why do we use static methods in c#?
What is parameterized constructor?
What is difference between continue and break in c#?
Explain copy constructor?
What is a factory in c#?
What is the real use of interface in c#?
Are multiple data types stored in System.Array?
Explain lock, monitors, and mutex object in threading.
Explain the types of assemblies in .net?
Why reflection is used in c#?
How many constructors can a class have c#?
What's the difference between System.String and System..StringBuilder in C#?