Merge pull request #301 from annando/1409-hourly-cache

Hourly cache for the curweather addon
pull/303/head^2
Tobias Diekershoff 2015-09-13 10:31:04 +02:00
commit fd9cfc7f31
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
'icon' => (string)$res->weather['icon'] 'icon' => (string)$res->weather['icon']
); );
set_pconfig(local_user(), 'curweather', 'last', $now->getTimestamp()); 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; return $r;
} }