How to implement custom client-side wcf caching -
i need implement custom caching of client proxy of wcf service. i've implemented ioperationbehavior interface. on server-side can set operationdescription.invoke property in applydispatchbehavior method , implement ioperationinvoker interface control operation execution. on client-side can't it.
in client-side can use iclientmessageinspector, iparameterinspector, iclientmessageformatter interfaces control message flow. main problem have store in cache service answer without information message format. when restore values cache should create message again in case of service response. cannot break following internal message processing. on moment lose necessary information message such encoding, content-type(json, xml) in case of restful services. final result - wcf cannot process such message. want disable message processing if cached value exists. how can it?
i choose absolutely different approach. instead of injecting functionality wcf pipeline define interface wcf proxy wrap wcf proxy custom class (caching proxy) , implement interface on wrapper class. call wcf done if caching proxy not contain required data.
Comments
Post a Comment