// cacheData adds the data to the cache if there is a cache and it isn't yet
// full. If adding the data fills the cache then it uses the cached data to
// populate the dataframe. The cached lines allow the datatypes of the
// columns to be guessed. If the cache is full then the data is added to the
// dataframe directly.
cacheData adds the data to the cache if there is a cache and it isn't yet
full. If adding the data fills the cache then it uses the cached data to
populate the dataframe. The cached lines allow the datatypes of the
columns to be guessed. If the cache is full then the data is added to the
dataframe directly.
// cacheData adds the data to the cache if there is a cache and it isn ' t yet // full . If adding the data fills the cache then it uses the cached data to // populate the dataframe . The cached lines allow the datatypes of the // columns to be guessed . If the cache is full then the data is added to the // dataframe directly .
func cacheData(dfr *DFReader, state *dfReadState, df *DF) (bool, error) {
	if state.cache == nil {
		return false, nil
	}
	var err error
	state.cache = append(state.cache, state.cols)
	if len(state.cache) == cap(state.cache) { 
		err = populateDF(dfr, state, df)
		state.cache = nil 
		if dfr.allowErrors {
			err = nil
		}
	}
	return true, err
}
func cacheData ( dfr * DFReader , state * dfReadState , df * DF ) ( bool , error ) { if state . cache == nil { return false , nil } var err error state . cache = append ( state . cache , state . cols ) if len ( state . cache ) == cap ( state . cache ) { err = populateDF ( dfr , state , df ) state . cache = nil if dfr . allowErrors { err = nil } } return true , err }
cacheData adds the data to the cache if there is a cache and it isn't yet
full.
cacheData adds the data to the cache if there is a cache and it isn ' t yet full .
// cache is full // we're finished with the cache now so clear it