code: func (ks *Pss) cleanKeys() (count int) {
  	ks.mx.Lock()
  	defer ks.mx.Unlock()
  	for keyid, peertopics := range ks.symKeyPool {
  		var expiredtopics []Topic
  		for topic, psp := range peertopics {
  			if psp.protected {
  				continue
  			}
  
  			var match bool
  			for i := ks.symKeyDecryptCacheCursor; i > ks.symKeyDecryptCacheCursor-cap(ks.symKeyDecryptCache) && i > 0; i-- {
  				cacheid := ks.symKeyDecryptCache[i%cap(ks.symKeyDecryptCache)]
  				if *cacheid == keyid {
  					match = true
  				}
  			}
  			if !match {
  				expiredtopics = append(expiredtopics, topic)
  			}
  		}
  		for _, topic := range expiredtopics {
  			delete(ks.symKeyPool[keyid], topic)
  			log.Trace("symkey cleanup deletion", "symkeyid", keyid, "topic", topic, "val", ks.symKeyPool[keyid])
  			count++
  		}
  	}
  	return count
  }
docs: // Symkey garbage collection
  // a key is removed if:
  // - it is not marked as protected
  // - it is not in the incoming decryption cache