开发者

How to do WCF REST Caching?

I have a WCF REST service which needs to return both Static and some filtered data based on what parameters were passed in by the clients(which are fat windows clients)

Since the data sto开发者_运维问答re which feeds this service doesnt change too often, I wanted to cache this data on the service(Server side caching), The data store is an Azure Table, I know WCF REST Starter kit has Web Cache for caching but it needs a web.config entry to do a fixed duration caching(ex: 30mins). I wanted to do this in code whenever my azure table entry changes. How can I accomplish this?

Also Since I have some processing/filtering to do on my service based on the parameters passed in, seems like I would have to create 2 methods, one private method with caching to get the data and the other one to process/filter and send back the results. Correct?


Check out some of the various blog post on the topic:

  • REST in WCF – Part X – Supporting Caching and Conditional GET
  • Adding caching to WCF RESTful services using the REST Starter Kit
  • Caching support for WCF REST services (.NET 4 beta)

Also check out the official MSDN WCF REST developer center for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜