A question aboout Cache_HTTP_Request

From: Date: Wed, 27 Aug 2003 14:42:02 +0000
Subject: A question aboout Cache_HTTP_Request
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20640@lists.php.net to get a copy of this message
I had a closer look at Cache_HTTP_Request today - and it seems be to quite what I've been looking for :-) But I'm having a small question - maybe someone can help me: I need to fetch data that are released via an official server 4 times a year - so each 3 months. I don't know the exact dates though. And as far as I know all cache-time are relative to the first execution of a Cache_HTTP_Request, right? If so I got two proposals: a) Would it be possible to make $expires not only being an integer but to also allow it being an array? In there you could e.g. include a specific date / time like. "expires-on" => "2003-08-30 01:00:00". Or you might decide to make expires-on be a unix timestamp. b) How about an option "re-validate"? If the content of the file has not been modified since a certain date there is no need to download it again. In my case the data is about 5mb large - and I don't want to get that data every day. So maybe I would choose this: array("expires" => 24 * 3600, "re-validate" => true); which might revalidate data every day and if it hasn't been modified would shut up for 24 hours again. But I got another problem: On some systems (with small internet- connection - maybe an intranet-machine with only ISDN-dialup) getting 5mb of data from the internet might take quite long. Therefor it would be nice to use the currently cached data for the current request but spawning off a separate task to download the latest version. Do you have any idea how this might be accomplished? Greetings Stefan

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