implement rudimentary caching for yahoo finance to avoid http 429 rate limiting
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
1 parent
13291da691
commit
61074bfd80
3 files changed
+31
-5
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package staticjsonYahooFinance
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const cacheAgeSeconds = 900
|
||||
|
||||
// intialized in providerImpl.go's Configure
|
||||
var chartCache map[string]chartCacheEntry
|
||||
|
||||
type chartCacheEntry struct {
|
||||
Chart chartResponse
|
||||
LastUpdated time.Time
|
||||
}
|
||||
Reference in new issue
Block a user