A computer includes a filter module providing a standardized interface for
intercepting file access requests. The computer also includes a cache
manager that manages the caching mode used with the requests. An
application on the computer issues a file access request and explicitly
or implicitly specifies a cache hint informing the cache manager of a
desired caching mode. A security scanner module scans files on the
computer for malicious software. The security scanner module intercepts a
file access request and alters the caching mode, if necessary, to one
optimized for security scanning. The security scanner module performs the
file scan using the optimal caching mode, and, if necessary, resets the
caching mode to its original state.