     if cachedPatterns.count == 0 {
       for pattern in patterns {
         cachedPatterns.append(pattern)
-        println(cachedPatterns.count)
       }
     } 
     misses++

          startIndex = im!.bodyRange().location
          pat = ip
          ret = im
          if startIndex == pos {
            break
          }
        }

    var iterations = maxIterations
    for var i = 0; i < sdata.length && iterations > 0; iterations-- {
      var (pat, result) = language.rootPattern.cache(sdata, position: i)
      var newLineLocation = sdata.rangeOfCharacterFromSet(NSCharacterSet.newlineCharacterSet(), options: nil, range: NSRange(location: i, length: sdata.length - i)).location
      if result == nil {
        break
