ClientCache plugin

If an expiration duration is specified, ClientCache sends "Cache-control" and "Expires" HTTP headers to the client. Installed by default.

IIS-level configuration (even in Web.config) can override the values set by ClientCache. Keep this in mind when troubleshooting issues.

Configuration

  1. Add <clientcache minutes="1440" /> to the <resizer /> section. This controls how many minutes in the future the Expires header will be set to.

Default behavior

Cache-control: public is sent for all anonymous requests. Cache-control: private is sent for all authenticated requests. Last-modified: is sent based on the modified date of the source file. Expires is sent only if 'minutes' is configured in web.config. For 24-hour expiration, use 1440 (suggested value).

This plugin (ClientCache plugin) is part of the Essential edition

Where is the plugins section?

The <plugins> section is located in Web.config, and is nested inside the <resizer> element, which is nested inside <configuration>. For examples, see this sample Web.config file.

Where can I find the dll?

We prefer that you install via NuGet, but you can also find the plugin DLL files in the /dlls/release folder of your download.

How do I typically install a plugin via Web.Config?

  1. In Visual Studio, right click on your project and choose "Add reference". Browse to the plugin DLL and click "OK".
  2. In the <plugins> section of Web.config, insert <add name="PluginName" />
  3. Look at the plugin documentation to see what configuration options (if any) are available.

How do I typically install a plugin via code?