The normal way to cache responses in ASP.NET is to use a HttpModule.
However to make it easier to compress adhoc responses I’ve just added a new [CompressResponse]
Response Filter attribute which you can use annotate a collection of Services or individual Services, e.g:
[CompressResponse]
public class MyCompressedServices : Service
{
}
public class MyServices : Service
{
[CompressResponse]
public object Any(MyCompress request) => ...;
}
This change is available from v4.5.7+ that’s now available on MyGet.