code: func (b *Bslack) fileCached(file *slack.File) bool {
  	if ts, ok := b.cache.Get("file" + file.ID); ok && time.Since(ts.(time.Time)) < time.Minute {
  		return true
  	} else if ts, ok = b.cache.Get("filename" + file.Name); ok && time.Since(ts.(time.Time)) < 10*time.Second {
  		return true
  	}
  	return false
  }
docs: // fileCached implements Matterbridge's caching logic for files
  // shared via Slack.
  //
  // We consider that a file was cached if its ID was added in the last minute or
  // it's name was registered in the last 10 seconds. This ensures that an
  // identically named file but with different content will be uploaded correctly
  // (the assumption is that such name collisions will not occur within the given
  // timeframes).