HomePHP Caching Result Sets in PHP: Implementing the Caching System in PHP 5
Caching Result Sets in PHP: Implementing the Caching System in PHP 5
Welcome to the final part of the series “Caching Result Sets in PHP.” Hopefully, the last chapter of this tutorial will help you to put together all of the classes developed in the previous part, and demonstrate how the complete caching system can be implemented in a PHP 5 controlled environment.
As you probably remember, the developed caching application is essentially composed of several classes that have a delineated range of operations, instead of being structured as a huge wealth of packaged methods and properties that don’t keep a strong relationship with each other.
This methodology for developing a complex system, by splitting the whole application into many functional classes, definitely presents greater flexibility and portability, since each class acts like a programming entity capable of receiving and transferring processed data, and plugging itself into another class.
Based on some of the key concepts described above, I’ve built a result set caching class that aggregates a MySQL abstraction class, and utilizes an array processor (known commonly as an array Iterator) to carry out all of the array operations.
Of course, the underlying theory would be rather useless without writing the code to be used in real environments. Therefore, let’s get ready to tackle the final round and build the complete caching application. It’s going to be exciting!