PHP
  Home arrow PHP arrow Caching Result Sets in PHP: Porting th...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Caching Result Sets in PHP: Porting the Code to PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2005-10-31

    Table of Contents:
  • Caching Result Sets in PHP: Porting the Code to PHP 5
  • One step prior to migrating: caching result sets with PHP 4
  • Taking advantage of an improved object model: updating the caching system to PHP 5
  • Yet another modified class: updating the “Result” class
  • The caching system’s core class: updating the “Cache” class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Caching Result Sets in PHP: Porting the Code to PHP 5


    (Page 1 of 5 )

    In this part of the series, you will see in detail an updated version of each class that composes the caching system, for a correct implementation in PHP 5. Also, the “Cache” class will be modified to work with an array processor class that handles array operations. It should help refresh your memory of techniques related to object-oriented programming.

    Welcome to the fifth part of the series “Caching result sets in PHP.” If you’ve been a patient reader, and followed the previous articles in this series, then you probably have a decent grounding in the different methods of developing a result set caching system, without the need to scratch your head looking for more complex solutions.

    As a matter of fact, storing a complete result set in a cache file for faster data retrieval and reduced server overload is an extremely versatile technique that brings to developers a greater level of flexibility, since it allows single or multiple post processing of the data, while keeping the inherent benefits of having a caching mechanism working transparently in the backend of a website.

    Many websites that use a database as a direct way to store contents that don’t change very often (naturally static), such as a product catalog, or a list of articles, to name a few cases, can significantly improve their performance by implementing a caching solution.

    Although the concept behind data caching certainly is not new, as modern developing techniques have emerged and found their place in the market, several approaches may be successfully taken.

    Particularly, when working with PHP, where either a procedural programming or an object-oriented approach is taken for solving many development issues, the subject is even richer with possibilities. Keeping in mind this concept, after going through the previous articles, we’ve developed a couple of procedural scripts that might be useful for implementing in small applications.

    However, we’ve not forgotten all the benefits of developing some classes that can be integrated within an expandable caching system. Indeed, if we step back for a while to the previous article, we’ve built a time expiry triggered caching class, which allows fast implementation in web applications.

    As I mentioned previously, the whole set of developed classes that worked in PHP 4, need to be updated to PHP 5, in order to take advantage of the powerful Object Model that was implemented in this version. So, let’s not waste more time in preliminaries and jump straight into the code. You’ll have a good time reading, I promise.

    More PHP Articles
    More By Alejandro Gervasio


       · This part of the series goes trough a step-by-step format, in order to update the...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT