I use the request filter attribute, which I apply to every service or method that should not be cached on the client.
public class NoCacheAttribute : RequestFilterAttribute
{
public override void Execute(IHttpRequest req, IHttpResponse res, object responseDto)
{
res.AddHeader(HttpHeaders.CacheControl, "no-store,must-revalidate,no-cache,max-age=0");
}
}
source
share