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"; ?> |
Next: Defining the Cache >>
More PEAR Articles Articles
More By bluephoenix