In-memory Cache
If the Application requires the files to be located physically in the same machine that the server runs but you want to cache the files in memory before serve to achieve the maximum performance then the DirOptions.Cache
is the field you have to enable.
The DirOptions.Cache
accepts DirCacheOptions
:
The DirCacheOptions
allows to cache files based on the available compressions(!) too. So if a client requests a gzip version of a file, then the server will be serve the gzip data directly, without the necessity to encode it on fly. This can improve your site's speed to over 50%. This is done automatically by the framework, you just have to provide available Encodings that you want to support and Iris can handle the rest work.
Usage
The
iris.MatchImagesAssets
is just a regular expression which ignores to compress all pre-compressed images for a second time, e.g..jpg
.
Last updated