diff options
Diffstat (limited to 'internal/cache')
| -rw-r--r-- | internal/cache/util.go | 2 | ||||
| -rw-r--r-- | internal/cache/visibility.go | 12 | 
2 files changed, 9 insertions, 5 deletions
| diff --git a/internal/cache/util.go b/internal/cache/util.go index 924869aad..fde2f9ada 100644 --- a/internal/cache/util.go +++ b/internal/cache/util.go @@ -18,7 +18,6 @@  package cache  import ( -	"database/sql"  	"errors"  	"time" @@ -42,7 +41,6 @@ func ignoreErrors(err error) bool {  		// (until invalidation).  		db.ErrNoEntries,  		db.ErrAlreadyExists, -		sql.ErrNoRows,  	)  } diff --git a/internal/cache/visibility.go b/internal/cache/visibility.go index e280054ec..a424ca5ac 100644 --- a/internal/cache/visibility.go +++ b/internal/cache/visibility.go @@ -48,9 +48,15 @@ func (c *Caches) initVisibility() {  			{Fields: "RequesterID", Multiple: true},  			{Fields: "Type,RequesterID,ItemID"},  		}, -		MaxSize:   cap, -		IgnoreErr: ignoreErrors, -		Copy:      copyF, +		MaxSize: cap, +		IgnoreErr: func(err error) bool { +			// don't cache any errors, +			// it gets a little too tricky +			// otherwise with ensuring +			// errors are cleared out +			return true +		}, +		Copy: copyF,  	})  } | 
