code: func (ethash *Ethash) cache(block uint64) *cache {
  	epoch := block / epochLength
  	currentI, futureI := ethash.caches.get(epoch)
  	current := currentI.(*cache)
  
  	// Wait for generation finish.
  	current.generate(ethash.config.CacheDir, ethash.config.CachesOnDisk, ethash.config.PowMode == ModeTest)
  
  	// If we need a new future cache, now's a good time to regenerate it.
  	if futureI != nil {
  		future := futureI.(*cache)
  		go future.generate(ethash.config.CacheDir, ethash.config.CachesOnDisk, ethash.config.PowMode == ModeTest)
  	}
  	return current
  }
docs: // cache tries to retrieve a verification cache for the specified block number
  // by first checking against a list of in-memory caches, then against caches
  // stored on disk, and finally generating one if none can be found.