cvs: pear /Services_Weather/Weather Metar.php
| From: | Alexander Wirtz | Date: | Mon, 06 Oct 2003 21:35:31 +0000 |
| Subject: | cvs: pear /Services_Weather/Weather Metar.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13451@lists.php.net to get a copy of this message | ||
eru Mon Oct 6 17:35:31 2003 EDT
Modified files:
/pear/Services_Weather/Weather Metar.php
Log:
*Prefixed Cache IDs
Index: pear/Services_Weather/Weather/Metar.php
diff -u pear/Services_Weather/Weather/Metar.php:1.14 pear/Services_Weather/Weather/Metar.php:1.15
--- pear/Services_Weather/Weather/Metar.php:1.14 Mon Oct 6 10:57:45 2003
+++ pear/Services_Weather/Weather/Metar.php Mon Oct 6 17:35:31 2003
@@ -16,7 +16,7 @@
// | Authors: Alexander Wirtz <alex@pc4p.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Metar.php,v 1.14 2003/10/06 14:57:45 eru Exp $
+// $Id: Metar.php,v 1.15 2003/10/06 21:35:31 eru Exp $
require_once "Services/Weather/Common.php";
@@ -832,7 +832,7 @@
$locationReturn = array();
- if ($this->_cacheEnabled && ($location = $this->_cache->get($id,
"location"))) {
+ if ($this->_cacheEnabled && ($location =
$this->_cache->get("METAR-".$id, "location"))) {
// Grab stuff from cache
$this->_location = $location;
$locationReturn["cache"] = "HIT";
@@ -853,7 +853,7 @@
if($this->_cacheEnabled) {
// ...and cache it
$expire = constant("SERVICES_WEATHER_EXPIRES_LOCATION");
- $this->_cache->extSave($id, $this->_location, "", $expire,
"location");
+ $this->_cache->extSave("METAR-".$id, $this->_location,
"", $expire, "location");
}
$locationReturn["cache"] = "MISS";
@@ -913,7 +913,7 @@
$weatherURL = "http://weather.noaa.gov/pub/data/observations/metar/stations/".$id.".TXT";
- if ($this->_cacheEnabled && ($weather = $this->_cache->get($id,
"weather"))) {
+ if ($this->_cacheEnabled && ($weather =
$this->_cache->get("METAR-".$id, "weather"))) {
// Wee... it was cached, let's have it...
$weatherReturn = $weather;
$this->_weather = $weatherReturn;
@@ -928,7 +928,7 @@
if ($this->_cacheEnabled) {
// Cache weather
$expire = constant("SERVICES_WEATHER_EXPIRES_WEATHER");
- $this->_cache->extSave($id, $weatherReturn, $unitsFormat, $expire,
"weather");
+ $this->_cache->extSave("METAR-".$id, $weatherReturn, $unitsFormat,
$expire, "weather");
}
$this->_weather = $weatherReturn;
$weatherReturn["cache"] = "MISS";