An improved method and system for client-side caching that transparently
caches suitable network files for offline use. A cache mechanism in a
network redirector transparently intercepts requests to access server
files, and if the requested file is locally cached, satisfies the request
from the cache when possible. Otherwise the cache mechanism creates a
local cache file and satisfies the request from the server, and also
fills in a sparse cached file as reads for data in ranges that are
missing in the cached file are requested and received from the server. A
background process also fills in local files that are sparse, using the
existing handle of already open server files, or opening, reading from
and closing other server files. Security is also provided by maintaining
security information received from the server for files that are in the
cache, and using that security information to determine access to the
file when offline.