code: func (nrt *NRTCachingDirectory) Close() error {
  	// NOTE: technically we shouldn't have to do this, ie,
  	// IndexWriter should have sync'd all files, but we do
  	// it for defensive reasons... or in case the app is
  	// doing something custom (creating outputs directly w/o
  	// using IndexWriter):
  	all, err := nrt.cache.ListAll()
  	if err != nil {
  		return err
  	}
  	for _, fileName := range all {
  		nrt.unCache(fileName)
  	}
  	err = nrt.cache.Close()
  	if err != nil {
  		return err
  	}
  	return nrt.Directory.Close()
  }
docs: // func (nrt *NRTCachingDirectory) CreateSlicer(name string, context IOContext) (slicer IndexInputSlicer, err error) {
  // 	nrt.EnsureOpen()
  // 	if NRT_VERBOSE {
  // 		log.Println("nrtdir.openInput name=%v", name)
  // 	}
  // 	if nrt.cache.FileExists(name) {
  // 		if NRT_VERBOSE {
  // 			log.Println("  from cache")
  // 		}
  // 		return nrt.cache.CreateSlicer(name, context)
  // 	}
  // 	return nrt.Directory.CreateSlicer(name, context)
  // }
  // Close this directory, which flushes any cached files to the
  // delegate and then closes the delegate.