|
|
|
@ -3,7 +3,6 @@ package cointop
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"sort"
|
|
|
|
|
"strings"
|
|
|
|
|
"sync"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
@ -127,7 +126,7 @@ func (ct *Cointop) ChartPoints(symbol string, name string) error {
|
|
|
|
|
if keyname == "" {
|
|
|
|
|
keyname = "globaldata"
|
|
|
|
|
}
|
|
|
|
|
cachekey := ct.CacheKey(fmt.Sprintf("%s_%s", keyname, strings.Replace(ct.State.selectedChartRange, " ", "", -1)))
|
|
|
|
|
cachekey := ct.CompositeCacheKey(keyname, name, ct.State.currencyConversion, ct.State.selectedChartRange)
|
|
|
|
|
|
|
|
|
|
cached, found := ct.cache.Get(cachekey)
|
|
|
|
|
if found {
|
|
|
|
@ -219,7 +218,7 @@ func (ct *Cointop) PortfolioChart() error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var graphData []float64
|
|
|
|
|
cachekey := strings.ToLower(fmt.Sprintf("%s_%s_%s", p.Symbol, convert, strings.Replace(selectedChartRange, " ", "", -1)))
|
|
|
|
|
cachekey := ct.CompositeCacheKey(p.Symbol, p.Name, convert, selectedChartRange)
|
|
|
|
|
cached, found := ct.cache.Get(cachekey)
|
|
|
|
|
if found {
|
|
|
|
|
// cache hit
|
|
|
|
|