I'm working on an HTTP REST service implemented on WCF. I'd like to set the HTTP cache control headers for my operations appropriately.
I've seen a few examples that involve using the WebOperationContext.Current.OutgoingResponse to modify the headers in each method. But let's be honest, that's a pain in the butt, especially since nearly all of my operations are going to use the same cache control policy (no-cache).
I'm thinking there must be an elegant way to set this. Perhaps a combination of a ServiceBehavior to set a service-level default, and OperationBehaviors to override that for certain operations? Or maybe there's some better way to do this?