Difference between HttpRuntime.Cache and HttpContext.Current.Cache?

后端 未结 3 600
忘了有多久
忘了有多久 2020-12-01 00:56

What is the difference between HttpRuntime.Cache and HttpContext.Current.Cache?

3条回答
  •  囚心锁ツ
    2020-12-01 01:50

    Caching using HttpContext uses HttpRuntime.Cache to do the actual caching. The advantage of using HttpRuntime directly is that it is always available in console applications and in unit tests.

提交回复
热议问题