cmd/stdiscosrv: Record time of failed lookup

So that we can eventually garbage collect keys that noone is asking
about any more.
This commit is contained in:
Jakob Borg
2018-03-06 16:15:29 +01:00
parent 22ebc80329
commit 71fab4d250
3 changed files with 48 additions and 15 deletions

View File

@@ -195,6 +195,7 @@ func (s *apiSrv) handleGET(ctx context.Context, w http.ResponseWriter, req *http
if misses%notFoundMissesWriteInterval == 0 {
rec.Misses = misses
rec.Missed = time.Now().UnixNano()
rec.Addresses = nil
// rec.Seen retained from get
s.db.put(key, rec)