From 954b5490290a60953eb990120cbcc682df83eefc Mon Sep 17 00:00:00 2001 From: Nazar Kanaev Date: Tue, 15 Feb 2022 21:56:32 +0000 Subject: [PATCH] update --- src/storage/item.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/storage/item.go b/src/storage/item.go index 29d15d5..de44dfc 100644 --- a/src/storage/item.go +++ b/src/storage/item.go @@ -293,17 +293,17 @@ func (s *Storage) SyncSearch() { } var ( - itemsKeepSize = 100 + itemsKeepSize = 50 itemsKeepDays = 90 ) // Delete old articles from the database to cleanup space. // // The rules: -// * Never delete starred entries -// * Take each feed capacity (number of entries provided by the feed) -// into account (see `SetFeedSize`, default: 100). -// This prevents old items from reappearing after the cleanup. +// * Never delete starred entries. +// * Keep at least the same amount of articles the feed provides (default: 50). +// This prevents from deleting items for rarely updated and/or ever-growing +// feeds which might eventually reappear as unread. // * Keep entries for a certain period (default: 90 days). func (s *Storage) DeleteOldItems() { rows, err := s.db.Query(`