views:

59

answers:

1

I know SysCache uses ASP caching under the hood, but since I'm not aware of the implementation of the ASP cache (and if it depends on anything IIS), I was wondering if SysCache would work in a non-web application (like a Windows Service)?

Activating it and using NHprofiler seems to show it is not.

+1  A: 

No it doesn't, Syscache is an abstraction over asp.net cache. You have to use a different cache for the service.

EDIT: I remember this blog post: http://www.hanselman.com/blog/UsingTheASPNETCacheOutsideOfASPNET.aspx They say it should be usable outside a web-environment. It's just not recommended because microsoft maintains it to be usable in a web environment. That means that you can use it now, but you might have trouble when .Net 4 (or 5, 6, 7, ...) is released.

Paco
Thanks. But assuming this is the case, shouldn't NHProfiler show a lot of cache misses? It doesn't show any hits or misses.
Khash
See edit why NHProfiler probably doesn't show misses. (I'm not completely sure)
Paco