PEAR_RemoteCache.php - cached XMLrpc

From: Date: Sat, 01 Jun 2002 09:02:37 +0000
Subject: PEAR_RemoteCache.php - cached XMLrpc
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6691@lists.php.net to get a copy of this message
Attached (hopefully) is a Class for Cached retrieval of the package data (although it could do other stuff).. Logical overview: PEAR server creates a cache of 'Package.listAll' as /xmlrpc/Package.listAll.xml every time a package is released. The User uses the installer to do a pear remote-list 1. it does a http HEAD command to access the HEADER details for that file. 2. it compares the modification time (from the http headers) with the cached file (if it exists). if they are current file is newer it does a full get request on the HTTP file. downloads it to {php_dir}/.registry/Package.listAll.xml 3. it loads the data from the cache -> and proccess it the same way that Remote used to... -------------------------- This stuff could be merged with PEAR_Remote / PEAR_Common - as it is basically a cut and paste with a few mods.. call : rename calllCached ? _fetchHead/_fetchBody .. add a _downloadCallback to Remote modify _downloadHttp in PEAR_Common to use $this->_requestType = "GET" | "HEAD" and return headers array on a HEAD call... split call_epi into call_epi and decode_epi --------------------------- The eventual outcome of this is that it may be possible to extend the installer to do 'channels' - pear channel-add phpbb http://www.phpbb.com pear install phpbb pear channel-add php-gtk http://gtk.php.net pear build php-gtk ......... the only infrastructure required by those channels would be 1. create a directory for xmlrpc 2. create and update a package.listAll.xml file 3. create the location tag or similar for the 'packaged' version of their application... anyway thats a bit later :) regards alan

« previous php.pear.dev (#6691) next »