implement rudimentary caching for yahoo finance to avoid http 429 rate limiting
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-07 19:59:30 -06:00
parent 13291da691
commit 61074bfd80
3 changed files with 31 additions and 5 deletions

View File

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