Set the cache size with the nc_var_set_cache function:
/* Use this to set the HDF5 data cache for a variable. */ EXTERNL int nc_var_set_cache(int ncid, int varid, size_t cache_size); /* Use this to get the HDF5 data cache for a variable. */ EXTERNL int nc_var_get_cache(int ncid, int varid, size_t *cache_sizep);