[PEAR-BUG] Req #16803 [Opn->Csd]: Caching without cache

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=16803&edit=1

 ID:               16803
 Updated by:       [email protected]
 Reported By:      jan at horde dot org
 Summary:          Caching without cache
-Status:           Open
+Status:           Closed
 Type:             Feature/Change Request
 Package:          Services_Weather
 Package Version:  1.4.5
 PHP Version:      Irrelevant
-Assigned To:      
+Assigned To:      eru
 Roadmap Versions: 
 New Comment:

-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: eru
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Thanks for the suggestion, please test, if possible!

Best regards,
Alexander


Previous Comments:
------------------------------------------------------------------------

[2009-12-08 14:49:23] yunosh

Make it a property.

------------------------------------------------------------------------

[2009-12-08 14:03:01] doconnor

static ? :(

I'm getting that whole "global state" vibe all over again...

------------------------------------------------------------------------

[2009-11-18 23:18:26] yunosh

Description:
------------
At least the weather.com driver is calling _parseWeatherData() in every
method. Common use cases call several methods of a Services_Weather
instance, not only one. If you don't use a cache, this leads to
subsequent requests to the weather.com API for each method call. With my
patch for the location bug, there even two requests for a single
getWeather() or getForecast() call.
If no cache is being provided, the weather data should at least be
cached in a static variable in the Services_Weather instance, so that at
least for a single instance, the API is only requested once, if
necessary. This would even be an improvement if using a cache, because
the cache doesn't have to be queried.

------------------------------------------------------------------------


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16803&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.