fix(feeds): ttl and correct field types (#259)

This commit is contained in:
Ludvig Lundgren 2022-05-01 16:09:00 +02:00 committed by GitHub
parent 5d032dd075
commit b7d1f216c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 8 deletions

View file

@ -122,10 +122,11 @@ func (j *TorznabJob) getFeed() ([]torznab.FeedItem, error) {
items = append(items, i)
ttl := (24 * time.Hour) * 28
// set ttl to 1 month
ttl := time.Now().AddDate(0, 1, 0)
if err := j.Repo.Put(j.Name, i.GUID, []byte("test"), ttl); err != nil {
j.Log.Error().Err(err).Str("guid", i.GUID).Msg("torznab getFeed: cache.Put: error storing item in cache")
if err := j.Repo.Put(j.Name, i.GUID, []byte(i.Title), ttl); err != nil {
j.Log.Error().Stack().Err(err).Str("guid", i.GUID).Msg("torznab getFeed: cache.Put: error storing item in cache")
}
}