AppFabric缓存序列化 [英] AppFabric cache serialization

查看:70
本文介绍了AppFabric缓存序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用AppFabric Cache覆盖默认序列化?  我们有一个非常高的量/高事务应用程序,并且所有xml序列化都会导致性能问题。  强制二进制序列化的方法吗?

Is it possible to override the default serialization with AppFabric Cache?  We have a very high volume/high transaction application and all the xml serialization is causing performance issues.  Any way to force binary serialization?

 

谢谢,

j

推荐答案

如果您将类标记为Serializable,您应该能够强制进行二进制序列化,但如果它也被标记,则不能作为XmlSerializable,哪个WCF更喜欢设计。如果有必要,您可以执行自己的二进制序列化并将结果
粘贴到应用程序结构缓存中,可能会减少XML序列化损失,但不知道您的有效负载是什么样的,我不确定这会有多大帮助您的方案。
If you mark your class as Serializable, you should be able to force binary serialization, but not if it's also marked as XmlSerializable, which WCF will prefer by design. If necessary, you can perform your own binary serialization and stick the result into app fabric cache with a possibly reduced XML serialization penalty, but without knowing what your payloads look like, I'm not sure how much that would help in your scenario.


这篇关于AppFabric缓存序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆