Awards []string
Resources Resources
- Incomplete bool // Set if the only the UDP API part of the query failed
- Updated time.Time // When the data was last modified in the server
- Cached time.Time // When the data was retrieved from the server
+ Incomplete bool // Set if the UDP API part of the query failed.
+ Updated time.Time // When the data was last modified in the server.
+ Cached time.Time // When the data was retrieved from the server.
}
type EpisodeCount struct {
if a == nil {
return true
}
+ if a.Incomplete {
+ return time.Now().Sub(a.Cached) > AnimeIncompleteCacheDuration
+ }
return time.Now().Sub(a.Cached) > AnimeCacheDuration
}
GroupCacheDuration = 4 * DefaultCacheDuration // They don't change that often.
FileCacheDuration = 8 * DefaultCacheDuration // These change even less often.
+ // Used when the UDP API Anime query fails, but the HTTP API query succeeds.
+ AnimeIncompleteCacheDuration = 24 * time.Hour
+
// Used when there's some data missing on a file.
// Usually happens because the AVDump data hasn't been merged with the database
// yet, which is done on a daily cron job.