PEAR Articles
  Home arrow PEAR Articles arrow Page 2 - Caching with PEAR::Cache
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
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? 
PEAR ARTICLES

Caching with PEAR::Cache
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2004-03-19

    Table of Contents:
  • Caching with PEAR::Cache
  • Installing Pear::Cache
  • Defining the Cache
  • Implementing a Framework
  • Combined Code
  • Conclusion

  • 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 with PEAR::Cache - Installing Pear::Cache


    (Page 2 of 6 )

    The Cache package is dependant upon a few other PEAR packages. It needs HTTP_Request which in turn is dependent upon Net_URL which in turn is dependent upon Net_Socket. Obviously there are some packages that must be installed prior to using Cache.

    Net_Socket is part of the default Pear installation so we can begin our installation instead with Net_URL:

    [root@zaemis www]# pear install Net_URL
    downloading Net_URL-1.0.11.tgz ...
    Starting to download Net_URL-1.0.11.tgz (4,474 bytes)
    .....done: 4,474 bytes
    install ok: Net_URL 1.0.11

    Next, we need to install HTTP_Request:

    [root@zaemis www]# pear install HTTP_Request
    downloading HTTP_Request-1.2.tgz ...
    Starting to download HTTP_Request-1.2.tgz (11,856 bytes)
    .....done: 11,856 bytes
    install ok: HTTP_Request 1.2

    Finally, we can install Cache:

    [root@zaemis www]# pear install Cache
    downloading Cache-1.5.3.tgz ...
    Starting to download Cache-1.5.3.tgz (32,242 bytes)
    .........done: 32,242 bytes
    install ok: Cache 1.5.3

    We're now ready to start caching! Pear::Cache can be made available to our PHP scripts simply by including Cache.php.

    <?php
    include "Cache.php";
    ?>

    More PEAR Articles Articles
    More By bluephoenix


       · For all my proficiency with PHP the need to do command line stuff has so far passed...
       · Dear AllI have defined variables as follow in an data entry formprod1...
       · Dear AllI have defined variables as follow in an data entry formprod1...
       · Essentially all of PHP setup and maintenance is conducted on a command line. You'll...
       · This type of question should really be posed in the forum. There are many people...
       · &quot;Net_Socket is part of the default Pear installation so...&quot;...
       · study
       · i think it's a case to case basis Jayden. what platform are you using?
     

    PEAR ARTICLES ARTICLES

    - Using XML_RPC2 with PEAR
    - Using Web Service APIs (Amazon and Yahoo!) w...
    - Database Abstraction with MDB2 from PEAR
    - The PEAR Package Tour: PEAR Basics
    - Caching with PEAR::Cache
    - Introduction to PEAR
    - The PEAR ITX Templating System






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway