]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge pull request #301 from annando/1409-hourly-cache
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 13 Sep 2015 08:31:04 +0000 (10:31 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 13 Sep 2015 08:31:04 +0000 (10:31 +0200)
Hourly cache for the curweather addon

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;
 }