Re: Package proposal: Payment_Exchange
| From: | Stefan Neufeind | Date: | Thu, 28 Aug 2003 10:56:20 +0000 |
| Subject: | Re: Package proposal: Payment_Exchange | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20730@lists.php.net to get a copy of this message | ||
On 28 Aug 2003 at 11:16, Bruno Pedro wrote:
> On Wed, 2003-08-27 at 04:22, Marshall Roch wrote:
>
> > 1) The exchange rates are published daily by the European Central
> > Bank as XML. It associates a 3-character code (ISO 4217) with
> > exchange rates relative to the Euro.
>
> > This package caches the exchange rate feed hourly, and the other two
> > monthly (they rarely change) with Cache_HTTP_Request.
>
> If the exchange rate feed is published daily, what is the need of
> caching it hourly?
I guess this is because Cache_HTTP_Request only allows you to specify
relative expiry-times - e.g. 1 hour. If you set it to 24 hours the
worst case might be that your data is first cached at 23:59h - on
0:00h new data is published. And since your expiry is 24 hours you
will get the updated data at 23:59h the following day :-((
Already proposed a change to Cache_HTTP_Request to allow
a) for detection of Last-Modified-headerfields to avoid unnecessary
downloads
b) for a method to tell Cache_HTTP_Request a fixed date / time when
the data should be validated against the source again (e.g. 0:05h in
the morning).
But it seems this won't make it into Cache_HTTP_Request in the next
time due to limitations in Cache as Fabien told me. This would be
possible with Cache_Lite (his package - he is not maintaining
Cache_HTTP_Request anymore) and he's thinking about moving
HTTP_Request to Cache_Lite_HTTP_Request also - but hasn't got time
for it yet.
I think we're in a bad situation cause the function in Cache_...
wouldn't be enhanced no more - only the Cache_Lite_... one - because
it's "his package". PS: Fabien, don't take this critic personally,
please!
Stefan