code: func (p Pages) ByLength() Pages {
  
  	const key = "pageSort.ByLength"
  
  	length := func(p1, p2 Page) bool {
  
  		p1l, ok1 := p1.(resource.LengthProvider)
  		p2l, ok2 := p2.(resource.LengthProvider)
  
  		if !ok1 {
  			return true
  		}
  
  		if !ok2 {
  			return false
  		}
  
  		return p1l.Len() < p2l.Len()
  	}
  
  	pages, _ := spc.get(key, pageBy(length).Sort, p)
  
  	return pages
  }
docs: // ByLength sorts the Pages by length and returns a copy.
  //
  // Adjacent invocations on the same receiver will return a cached result.
  //
  // This may safely be executed  in parallel.