Chapter 11. Memory Cache
When Google examined the usability of the Google Search service, it found that one of the factors that most influences the usability of a web application is speed. Users prefer web applications that are faster to equivalent applications that are slower. Over the years, Google has learned how to make web applications run fast, even when millions of users are accessing those applications. One approach to increasing the speed of a web application is to use a distributed memory cache for storage, instead of retrieving commonly used data from disk.
When you put information into the Datastore, your information is stored permanently and is stored somewhere in the cloud on disks and backed up and maintained even when your application is not in use.
The memory cache is spread across the memory of all the instances of your application in the cloud (Figure 11-1). It is also possible to have dedicated memory cache servers. Because the memory cache is “temporary,” it does not have to be stored on disk or backed up. This makes the memory cache much faster then the Datastore.
Figure 11-1. The memory cache and Datastore
The memory cache is based on a product called “memcached,” which provides a high-speed distributed cache in a number of languages. The memcached software uses the network to keep all of the copies of the data in sync. When the data is updated in one of the servers, ...