mirror of
https://github.com/seigler/cryptohistory.org
synced 2025-07-27 01:36:11 +00:00
fix caching time
This commit is contained in:
parent
1bc4c247d1
commit
46764e6879
2 changed files with 4 additions and 4 deletions
|
@ -82,7 +82,7 @@ function renderChart(
|
|||
if(is_null($poloniexJson)) {
|
||||
$poloniexJson = getJson($poloniexUrl);
|
||||
// Write to cache for next time
|
||||
CacheManager::set('poloniex-json-'.$pair.'-'.$dataDuration, $poloniexJson, $dataDuration);
|
||||
CacheManager::set('poloniex-json-'.$pair.'-'.$dataDuration, $poloniexJson, $dataResolution);
|
||||
}
|
||||
|
||||
$chartData = [];
|
||||
|
@ -111,10 +111,10 @@ function renderChart(
|
|||
$im->destroy();
|
||||
}
|
||||
CacheManager::set($chartCacheKey, $result);
|
||||
$resultExpires = time() + $dataDuration;
|
||||
$resultExpires = time() + $dataResolution;
|
||||
} else {
|
||||
$resultExpires = CacheManager::getInfo($chartCacheKey)[ 'expired_time' ];
|
||||
$startTime = $resultExpires - $dataDuration;
|
||||
$startTime = $resultExpires - $dataResolution;
|
||||
}
|
||||
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s', $resultExpires));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue