O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Caching

Interacting with a database is an expensive operation. This is due to the fact that any database interaction consists of sending a query request over the network, compiling the query on the database server, executing the query, producing the result, and finally sending the result back to the client.

Databases use different strategies to optimize performance. One of these strategies is caching the data for a period of time. Caching prevents unnecessary query compiling and disk I/O. Although the database-side caching strategy can be very effective (because it does not consider network traffic), this strategy has limited value when there are a large number of requests.

A typical strategy in this situation is an application-side cache mechanism. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required