What is the default serialization used by the ASP.net HttpRuntime.Cache

后端 未结 3 1887
予麋鹿
予麋鹿 2020-12-10 17:04

Just wondering if anyone knows definitively what the default serialization used by the ASP.net HttpRuntime.Cache is? Is it Binary, XML, something else?

I ask because

3条回答
  •  借酒劲吻你
    2020-12-10 17:50

    According to Reflector, HttpRuntime.Cache doesn't serialize data at all, it merely stores it in memory in a Hashtable.

    You say you wrap calls to the cache inside your own singleton object. Why do you do this? HttpRuntime.Cache is a static property, and so your wrapper methods can be static too.

提交回复
热议问题