joyent/node — Issue #2173: fs.CreateReadStream() - noCache option
Author: networkimprov
Created: 2011-11-23 20:00:28+00:00
State: open

The 'options' argument should support a noCache boolean field, which if true calls this after each read():

posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);

This prevents the file from being added to the filesystem cache; important when reading a large number of files once, as for backup or indexing.

(Depends on a new binding in libuv, see https://github.com/joyent/libuv/issues/256)