Adds a new MapStaticAssetEndpoints routerware that reads a manifest generated at build / publish time and maps the endpoints defined in the manifest to the files in the application wwwroot folder.
Adds a MatcherPolicy to perform content negotiation based on the Accept-Encoding header. Compressed resources contain a ContentEncoding attribute in their metadata that is used to filter out the compressed asset to serve to the client based on the Accept-Encoding header.
The content encoding has an associated Quality value that represents the 'server preference' for the encoding. We always use the client preference and only rely on the server preference to break ties.
This process is completely driven by de the build and transparent to the runtime, if in the future we add support for zstd, sbr, etc. we don't need to change the runtime.
The logic for serving static files is borrowed from the static files middleware, with simplifications and additions. I've ported the relevant tests to ensure a high degree of compatibility.
The logic is new "routerware" instead of directly baked into the static files middleware because we do not want to pollute that middleware with more complex logic and we are going to be layering fingerprinting on top of this change, which will register more endpoints that will include more custom headers, which is not suitable for the static files middleware.
During development we wrap the endpoints we generate to support changing the files while the app is running (we recompute some of the values on the fly and also register a fallback route that matches file patterns to serve new files added while the app is running).
The build/publish process computes all the required information about the assets that is used to emit the response. The ETag and Last-Modified values are computed using the Base64(SHA256) hash of the content and the LastWrite on the file at build/publish time.
* split SE.Redis OutputCache implementation into new package, Microsoft.AspNetCore.OutputCaching.StackExchangeRedis
(it was causing an undesirable framework ref)
- remove the output cache functionality and ref from Microsoft.Extensions.Caching.StackExchange.Redis
- (simplified API [un]shipped.txt back to single; no change except no more unshipped)
- moved functionality to new package (and update eng files accordingly)
- new namespace etc; will need API review
- in particular, RedisCacheOptions was shared between both APIs; now RedisOutputCacheOptions
* update tags
* add a startvs.cmd
* remove ExcludeFromSourceBuild
* revert shipped/unshipped to make CI happy
* keep public API file position to minimize PR size
* seal RedisOutputCacheOptions
* file named incorrectly
* unnecessary using directive
* remove IOptions<T> from RedisOutputCacheOptions (required using DI in the tests)