cdflib.setCacheSize
Specify number of dotCDF cache buffers
Syntax
cdflib.setCacheSize(cdfId,numBuffers)
Description
cdflib.setCacheSize(cdfId,numBuffers)
specifies the number of cache buffers the CDF library uses for an
open dotCDF file. A dotCDF file is a file with
the .cdf
file extension.
cdfId
identifies an open CDF file. numBuffers
is
a numeric value that specifies the number of buffers.
For information about cache schemes, see the CDF User's Guide.
Examples
Create a CDF file and set the cache size. To run this example, you must have write permission in your current folder.
cdfId = cdflib.create("your_file.cdf"); % Get the default cache size numBuf = cdflib.getCacheSize(cdfId)
numBuf = 300
% Specify a cache size cdflib.setCacheSize(cdfId,150) % Check the cache size again numBuf = cdflib.getCacheSize(cdfId)
numBuf = 150
% Clean up cdflib.delete(cdfId) clear cdfId
Tips
This function corresponds to the CDF library C API routine
CDFsetCacheSize
.To use this function, you must be familiar with the CDF C interface. You can access the CDF documentation at the CDF website.