开发者

How do I cache WCF REST web service in IIS7?

开发者 https://www.devze.com 2022-12-28 04:27 出处:网络
When I turn on output caching for my service it doesn\'t appear to be cache-worthy in IIS.It really should be since I\'m returning the same JSON content over and over.The varyByQueryString option seem

When I turn on output caching for my service it doesn't appear to be cache-worthy in IIS. It really should be since I'm returning the same JSON content over and over. The varyByQueryString option seems like it would do the trick, but since my resources are URI based, there really isn't a query string, just a path to a resource. Has anyone successfully gotten IIS to output cache a WCF REST ser开发者_高级运维vice?


After much digging using the FREB logs in IIS, my service is in fact cache-worthy. You can listen to the Cache events in IIS and it will show you exactly what is and is not caching. I found this more helpful that using PerfMon. I used the following link to set it up. Output caching will work and will in fact serve your content right out of memory after things get warmed up.

0

精彩评论

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

关注公众号