func cacheRefreshDuration(duration, elapsed time.Duration) time.Duration {
	remaining := duration - elapsed
	if remaining >= time.Second {
		return remaining / 2
	}
	return remaining
}
// cacheRefreshDuration determines how long to wait until a cache refresh should occur
cacheRefreshDuration determines how long to wait until a cache refresh should occur
// cacheRefreshDuration determines how long to wait until a cache refresh should occur
func cacheRefreshDuration(duration, elapsed time.Duration) time.Duration {
	remaining := duration - elapsed
	if remaining >= time.Second {
		return remaining / 2
	}
	return remaining
}
func cacheRefreshDuration ( duration , elapsed time . Duration ) time . Duration { remaining := duration - elapsed if remaining >= time . Second { return remaining / 2 } return remaining }
cacheRefreshDuration determines how long to wait until a cache refresh should occur
cacheRefreshDuration determines how long to wait until a cache refresh should occur