Caching in the ORM
Caching in the ORM
Every application is different, we could have models whose data change frequently and others that rarely change. Accessing database systems is often one of the most common bottlenecks in terms of performance. This is due to the complex connection/communication processes that PHP must do in each request to obtain data from the database. Therefore, if we want to achieve good performance we need to add some layers of caching where the application requires it.
This chapter explains the possible points where it is possible to implement caching to improve performance. The framework gives you the tools to implement the cache where you demand of it according to the architecture of your application.
Caching Resultsets
A well established technique to avoid continuously accessing to the database is to cache resultsets that don’t change frequently using a system with faster access (usually memory