code: func (l *LayoutHandler) For(d LayoutDescriptor, f Format) ([]string, error) {
  
  	// We will get lots of requests for the same layouts, so avoid recalculations.
  	key := layoutCacheKey{d, f.Name}
  	l.mu.RLock()
  	if cacheVal, found := l.cache[key]; found {
  		l.mu.RUnlock()
  		return cacheVal, nil
  	}
  	l.mu.RUnlock()
  
  	layouts := resolvePageTemplate(d, f)
  
  	layouts = prependTextPrefixIfNeeded(f, layouts...)
  	layouts = helpers.UniqueStrings(layouts)
  
  	l.mu.Lock()
  	l.cache[key] = layouts
  	l.mu.Unlock()
  
  	return layouts, nil
  }
docs: // For returns a layout for the given LayoutDescriptor and options.
  // Layouts are rendered and cached internally.