Adding Cache

This commit is contained in:
amantahiliani committed 2026-03-03 01:16:04 -05:00
1 parent f0641262bd
commit cb77df0eb6
7 files changed
+160 -19

No files matched your search

+2
View File
@@ -8,11 +8,13 @@ import (
type OpenF1Client struct {
url string
httpClient *http.Client
cache *FileCache
}
func NewOpenF1Client(url string, timeout time.Duration) *OpenF1Client {
return &OpenF1Client{
url: url,
httpClient: &http.Client{Timeout: timeout},
cache: NewFileCache(),
}
}