【发布时间】:2013-10-08 12:41:18
【问题描述】:
我有一个 WCF Web 服务的端点,它没有在 AJAX 请求的性能监视器中获得输出缓存命中,它确实获得了对端点的非 AJAX 请求的输出缓存。
网络配置:
<caching>
<outputCacheSettings >
<outputCacheProfiles>
<add location="Any" name="myCache" duration="3600" varyByParam="*" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
配置中是否缺少我的选项?我没有包含 Javascript,因为我怀疑问题出在哪里,因为服务器不应该检查任何标头来确定缓存的价值。
端点:
[AspNetCacheProfileAttribute("myCache")]
[WebGet(ResponseFormat= WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "suburb?name={name}&state={state}&category={category}&bedrooms={bedrooms}&country={country}")]
【问题讨论】:
-
您也可以发布 Javascript 吗?我刚刚尝试重新创建它以查看是否不显式启用输出缓存行可能会产生效果但无济于事,并且只能通过 JS 修改获得您所看到的行为。
标签: c# asp.net .net wcf caching