Lifetime of service instance in ServiceStack?

servicestack

Solution

The Services are not singletons. An instance is created with every request.

Take a look at the following test that ensures this ServiceStack / tests / ServiceStack.ServiceHost.Tests / ServiceCreationTests.cs

Problem

I created service derived from ``` ServiceStack.ServiceInterface.Service ``` implementing some requests. What is the lifetime of this service instance - e.g. is there created a new instance per call or is the instance cached?

Original source