.NET WebAPI 2 NoCacheAttribute 2016-10-13

Attribute for preventing .NET WebAPI 2 GET requests from being cached on the client, namely IE11 which uses aggressive caching. Affects all clients, not only IE11.

Usage: Either decorate individual API methods with [NoCache] or globally:

...
public static class WebApiConfig
{
    public static void Register(HttpConfiguration config)
    {
        config.Filters.Add(new NoCacheAttribute());
        ...

Sources: