What is the difference between HybridHttpOrThreadL

2019-02-11 21:44发布

问题:

Simply, what is the difference between HybridHttpOrThreadLocalScoped & HttpContextScoped?

回答1:

HttpContext always uses HttpContext (and fails if not running within a web request). HybridHttpOrThreadLocalScoped uses the HttpContext when available - if not, it falls back to caching per thread.