3

カスタム IDataCacheObjectSerializer クラスを使用するように Web ロールで Azure Cache を構成するにはどうすればよいですか? なぜカスタム シリアライザーを使用するのか疑問に思われている場合: コンパクトなテキスト ベースのスタイルの JSON (.net) シリアライゼーションと圧縮を組み合わせて使用​​したいと考えています。私の .config ファイルでは、圧縮を有効にすることができます:

<dataCacheClient name="default" isCompressionEnabled="true"/>

しかし、Azure Cache (プレビュー) に、JSON シリアル化を使用するカスタム IDataCacheObjectSerializer クラスを使用するように、どのように/どこで指示すればよいでしょうか?

4

1 に答える 1

3

Jagan Peri には関連するブログ記事があります。

投稿から:

<dataCacheClients>
    <tracing sinkType="DiagnosticSink" traceLevel="Verbose" />

    <!-- This is the default config which is used for all Named Caches
    This can be overriden by specifying other dataCacheClient sections with name being the NamedCache name -->

    <dataCacheClient name="default" useLegacyProtocol="false">
        <autoDiscover isEnabled="true" identifier="WorkerRole1" />
        <!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />-->
        <serializationProperties serializer="CustomSerializer" customSerializerType="Your.Fully.Qualified.Path.To.IDataCacheObjectSerializer,WorkerRole1" />
    </dataCacheClient>
</dataCacheClients>
于 2012-08-29T16:42:46.037 に答える