PEAR Articles

  Home arrow PEAR Articles arrow Page 2 - Caching with PEAR::Cache
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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    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

    blog comments powered by Disqus

    PEAR ARTICLES ARTICLES

    - Installing PEAR
    - PEAR: an Introduction
    - Managing robots.txt using PHP: Generating Dy...
    - Deleting Authors from a PEAR Content Managem...
    - PEAR CMS: Index and Delete Scripts
    - Listing Articles for a PEAR Content Manageme...
    - Building an Authors Page for a PEAR CMS
    - Building the View Details Page in a PEAR CMS
    - Creating the Main Pages of a PEAR CMS
    - Completing the Login Script for a PEAR CMS
    - User Authentication for a PEAR CMS
    - A PEAR CMS: Examining the Code
    - Building a Content Management System with PE...
    - Installing a PEAR Package
    - My PEAR: The Beginning


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap