I have a WCF web service that implements a RESTful interface. We’re using the InstanceContextMode of PerCall, and are looking for options to use for caching objects for reuse on subsequent calls.
We’re looking to override/extend the WCF Context logic in order to create/maintain/clean up objects to be shared among implementation methods of a PerCall service interface.
I’d also like to see a diagram of the objects created/used during a call to a WCF interface. I have a very nice one for ASP.Net event calls, but I haven’t found anything for WCF. I’m not sure which classes to override or interfaces to implement to interject my own logic into the WCF call hierarchy for persisting objects between calls.
If you are looking for events happening, this is a must read – there are very nice diagrams there as well.
Objects created very much depend on your configuration. With WCF REST, I imagine it must be small.
If I were you, I would not go down the route of caching and solving a problem that does not exists – or at least I assume so from your question.
PerCallis the only scalable setting. Also I imagine a REST service would be designed as stateless anyway.