DevShed has released their latest article in the "Caching Result Sets in PHP" series - Object Interaction Within a Caching System.
Therefore, we need to complete the scenario, not only showing how the class may be correctly implemented, but how the additional classes interact with each other.
Are you feeling inclined to work with aggregation and composition? All right, let’s get started.
In this article, we work directly with a standalone caching class, showing how it interacts with other objects. We will work with aggregation and composition to achieve our goals, which include implementing a time expiry based caching mechanism.
They build on all of the previous code, and add in a MySQL wrapper class to help with the database connection, and a "Result" class to work with the handling of the MySQL connections (as opposed to the connections themselves). They combine them together and make a practical example out of them...




