IISxpress Forums

The place to discuss IISxpress and HTTP compression on IIS
Welcome to IISxpress Forums Sign in | Join | Help
in Search

Static Cache in IISxpress 2.1

Last post 05-22-2007, 9:46 PM by admin. 1 replies.
Sort Posts: Previous Next
  •  05-22-2007, 9:46 PM 60

    Static Cache in IISxpress 2.1

    An IISxpress user recently asked the following question about the new static cache in IISxpress 2.1:
    What criteria does the cache use to determine if it needs to re-build that cache item? I have some static files (CSS, JS) that sometimes get updated, and want to ensure that they get pushed out updated, and not cached.
  •  05-22-2007, 9:46 PM 61 in reply to 60

    Re: Static Cache in IISxpress 2.1

    When IIS processes a static response (i.e. something that isn't ASP, ASP.NET, CGI, etc.) it adds a field to the HTTP response header called Last-Modified, this field contains the last modified date/time of the file requested. When the file changes the field changes as well, therefore IISxpress uses a combination of the URL, Last-Modified field, the size of the response and the content type of the response as the key used to store the compressed data in the cache. Therefore any change in the source file will cause the cached item to be invalidated, the response compressed again and then placed in the cache.

    In addition to these checks IISxpress will not cache any request/response with a query string. This is a failsafe incase IIS doesn't correctly identify the response as being created dynamically. This feature was added since it's possible to map HTML, CSS, JS, or any other extension to be handled by ASP.NET or any other dynamic content engine. For example, if the client requests /images/index.html?test=true, the response will not be cached.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems