Skip to content

gregpakes/aspnetwebapi-outputcache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

ASP.NET Web API OutputCache

A simple filter bringing caching options, similar to MVC's "OutputCacheAttribute" to Web API ApiControllers.

Usage:

    [WebApiOutputCache(120, 0, false)]
    public IEnumerable<string> Get()
    {
        return new string[] { "value1", "value2" };
    }

    [WebApiOutputCache(0, 60, false)]
    public string Get(int id)
    {
        return "value";
    }

Where the first parameter indicates caching on the server side in seconds, the second indicates caching on the client side in seconds, and the third decides whether to cache for anonymous users only.

About

aspnetwebapi-outputcache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%