MCPcopy
hub / github.com/kkdai/youtube / GetCacheBefore

Method GetCacheBefore

player_cache.go:21–26  ·  view source on GitHub ↗

GetCacheBefore : can pass time for testing

(key string, time time.Time)

Source from the content-addressed store, hash-verified

19
20// GetCacheBefore : can pass time for testing
21func (s playerCache) GetCacheBefore(key string, time time.Time) playerConfig {
22 if key == s.key && s.expiredAt.After(time) {
23 return s.config
24 }
25 return nil
26}
27
28// Set : set cache with default expiration
29func (s *playerCache) Set(key string, operations playerConfig) {

Callers 2

GetMethod · 0.95
TestPlayerCacheFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestPlayerCacheFunction · 0.76