The docs state that yes, IIS rewrite can prevent file caching.
Interaction with IIS Output Caching
The URL Rewrite Module controls the IIS output cache behavior in order
to:
Optimally utilize kernel mode and user mode output caching of
responses for rewritten URLs, thus improving performance of the Web
application that uses URL Rewrite Module. Prevent caching of
responses, when caching logic may be violated due to URL rewriting.
The module controls output caching either by altering certain caching
properties or by disabling the caching altogether. The module cannot
enable output caching if it has been disabled by IIS configuration or
by any other module in the IIS pipeline. The output caching is
controlled as follows:
The module always sets the user mode cache setting varyByHeader="HTTP_X_ORIGINAL_URL". This ensures that when user mode
caching is enabled the module takes into account the original URL to
construct a key for the cache entry.
If a rewrite rule set uses server variables with values that are either constant throughout the life of the process or are derived from
the requested URL, the rule set is considered safe for output caching.
This means that the URL Rewrite Module will not alter existing caching
policy in any way other than setting varyByHeader as described in step
The following server variables, when used in rewrite rules, do not
cause any effect on output caching policy:
"CACHE_URL", "DOCUMENT_ROOT", "HTTP_URL", "HTTP_HOST", "PATH_INFO",
"PATH_TRANSLATED", "QUERY_STRING", "REQUEST_FILENAME", "REQUEST_URI",
"SCRIPT_FILENAME", "SCRIPT_NAME", "SCRIPT_TRANSLATED",
"UNENCODED_URL", "URL", "URL_PATH_INFO", "APP_POOL_ID",
"APPL_MD_PATH", "APPL_PHYSICAL_PATH", "GATEWAY_INTERFACE",
"SERVER_SOFTWARE", "SSI_EXEC_DISABLED"
3 . If a rewrite rule set uses any server variable not mentioned in the above list, the rule set is considered unsafe for output caching. This
means that the URL Rewrite Module will disable kernel mode caching for
all requests whether the request URLs were rewritten or not. In
addition, the module will alter the caching policy for user-mode cache
by setting the caching property varyByValue to contain the
concatenated string of all server variables values used in the rule
set.