Why use System.Runtime.Caching or System.Web.Caching Vs static variables?

后端 未结 3 1742
轻奢々
轻奢々 2020-12-25 11:56

Long time listener - first time caller. I am hoping to get some advice. I have been reading about caching in .net - both with System.Web.Caching and System.Runtime.Caching

3条回答
  •  鱼传尺愫
    2020-12-25 12:32

    Other than expiration (and I wouldn't want this to expire) ...

    If you don't care about the life-time the name is not caching anymore.

    Still using Application (your case) and Session object are best practices for storing application level and session level data.

提交回复
热议问题