code: func (cm *cacheManager) init(ctx context.Context) error {
  	items, err := cm.md.All()
  	if err != nil {
  		return err
  	}
  
  	for _, si := range items {
  		if _, err := cm.getRecord(ctx, si.ID(), false); err != nil {
  			logrus.Debugf("could not load snapshot %s: %v", si.ID(), err)
  			cm.md.Clear(si.ID())
  			// TODO: make sure content is deleted as well
  		}
  	}
  	return nil
  }
docs: // init loads all snapshots from metadata state and tries to load the records
  // from the snapshotter. If snaphot can't be found, metadata is deleted as well.