HttpRuntime Cache vs. static dictionary/fields

后端 未结 3 1834
小鲜肉
小鲜肉 2021-02-15 15:22

What are the main pros and cons for using HttpRuntime Cache against using simple static field?

I need to store data in scope of entire

3条回答
  •  隐瞒了意图╮
    2021-02-15 16:20

    HttpRuntime.Cache allows you to specify expiration callback, but with static dictionary you will have to wait for a query to run your expiration loop of your cache items.

提交回复
热议问题