How to do WCF REST Caching?

2019-04-12 01:27发布

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 store 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?

标签: rest caching wcf
1条回答
Anthone
2楼-- · 2019-04-12 01:36
登录 后发表回答