Приглашаем посетить
Отели (hotels.otpusk-info.ru)

Chapter 10.  Data Component Caching

Previous
Table of Contents
Next

10. Data Component Caching

WRITING DYNAMIC WEB PAGES IS A BALANCING act. On the one hand, highly dynamic and personalized pages are cool. On the other hand, every dynamic call adds to the time it takes for a page to be rendered. Text processing and intense data manipulations take precious processing power. Database and remote procedure call (RPC) queries incur not only the processing time on the remote server, but network latency for the data transfer. The more dynamic the content, the more resources it takes to generate. Database queries are often the slowest portion of an online application, and multiple database queries per page are common, especially in highly dynamic sites. Eliminating these expensive database calls tremendously boost performance. Caching can provide the answer.

Caching is the storage of data for later usage. You cache commonly used data so that you can access it faster than you could otherwise. Caching examples abound both within and outside computer and software engineering.

A simple example of a cache is the system used for accessing phone numbers. The phone company periodically sends out phone books. These books are large, ordered volumes in which you can find any number, but they take a long time to flip through (They provide large storage but have high access time.) To provide faster access to commonly used numbers, I keep a list on my refrigerator of the numbers for friends, family, and pizza places. This list is very small and thus requires very little time to access. (It provides small storage but has low access time.)


Previous
Table of Contents
Next