]> git.mxchange.org Git - friendica-addons.git/commitdiff
Hourly cache for the curweather addon
authorMichael Vogel <icarus@dabo.de>
Sun, 13 Sep 2015 06:30:40 +0000 (08:30 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 13 Sep 2015 06:30:40 +0000 (08:30 +0200)
curweather/curweather.php

index 59d7e37886118caad7ea1f7d430f390225d53872..e28cc2b3044adc6978128aedf631b055199b64fd 100644 (file)
@@ -57,7 +57,7 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
        'icon' => (string)$res->weather['icon']
     );
     set_pconfig(local_user(), 'curweather', 'last', $now->getTimestamp());
-    Cache::set('curweather'.md5($url), serialize($r));
+    Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR);
     return $r;
 }