Versions in this module Expand all Collapse all v0 v0.61.1 Jun 27, 2026 Changes in this version + func FetchTextLines(ctx context.Context, url string) ([]string, error) + type CacheConfig struct + ReturnStale bool + StaticExpiry time.Duration + type CacheResult int + const CacheResultCached + const CacheResultFresh + const CacheResultStale + type CachingFetcher struct + func NewCachingFetcherWithFunc[T any](url string, config CacheConfig, fetchFunc FetchFunc[T]) *CachingFetcher[T] + func NewCachingFetcher[T any](url string, config CacheConfig) *CachingFetcher[T] + func (f *CachingFetcher[T]) Get(ctx context.Context) (T, CacheResult, error) + func (f *CachingFetcher[T]) GetCacheInfo() (cachedAt, expiresAt time.Time, hasData bool) + func (f *CachingFetcher[T]) GetCachedData() *T + type FetchFunc func(ctx context.Context, url string) (T, error) + type FetchResult struct + Data T + Error error + Result CacheResult