My windows service is hosting WCF services.
From what I understand my wcf services can be a singleton or have it create new endpoints per client request.
And I understand from this, if it is singleton, any caching done inside a endpoint will behave different when compared to if the endpoints are generated per client request.
If I am wrong in the above setup, please correct me.
What caching options do I have?
Is it similar to the web where multiple requests which are new instances of web pages have a cache store that can be used application wide?
Take a look at
This Link
for your endpoint management.
It sums to:
What I’ve usually done in situations like this is an per-session instance-cache. (Of course it depends on what I’m trying to do).
I use a cache object as in the following:
Where cachedConfiguration is my static cached object. This function acts as my accessor to configuration data (in this case).