ServiceStack selfhosting disable caching for memory

69 views Asked by At

Using Selfhosting standard ServiceStack MVC Application every request get cached in the memory. Changing any js file have no conscience until i restart the server. Is there any way around this problem for developing purposes?

1

There are 1 answers

0
mythz On BEST ANSWER

Every request does not get cached in memory, when you're self-hosting it's running the binary dlls and static files that are copied into your /bin folder.

You can change Config.WebHostPhysicalPath to change ServiceStack to serve files from your solution folder instead, e.g:

SetConfig(new HostConfig {
#if DEBUG
    DebugMode = true,
    WebHostPhysicalPath = Path.GetFullPath(Path.Combine("~".MapServerPath(), "..", "..")),
#endif
});