mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
Adding Cache
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user