Index: weather.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/weather/weather.module,v
retrieving revision 1.85
diff -u -w -b -r1.85 weather.module
--- weather.module	17 Apr 2004 20:22:20 -0000	1.85
+++ weather.module	11 Sep 2004 19:51:30 -0000
@@ -513,6 +513,12 @@
 
     $host = "weatherroom.com";
     $uri = "xml/ext/".$this->_region;
+    // Check cache for XML retrieved in last 10 minutes
+    $cacheid = "weather:xml:".$uri;
+    $cache = cache_get($cacheid);
+    if((!empty($cache)) and ($cache->created > time() - 600)) {
+        $weather_input = $cache->data;
+    } else {
     $weather_input = "";
 
     // I/O error-handling hack
@@ -544,6 +550,8 @@
         $weather_input = substr($weather_input, 0, -1);
       }
     }
+      cache_set($cacheid, $weather_input);
+    }
 
     if ($print_feed) {
       return $this->feed = $weather_input;
