如何实现;缓存控制:公共,最大年龄=600“;在WCF中使用AspNetCacheProfile 我正将缓存应用到企业API中。为了与支持反向代理缓存的负载平衡器兼容,我正在尝试实现类型为“public,max age=600”的缓存控制
但是,我只能让WCF输出“private,max age=600”,这不适合反向代理缓存 我将以下配置文件设置为location:Server(因为我需要ASP应用程序级缓存),但我也尝试了所有其他位置,但没有一个位置会为我提供公共服务如何实现;缓存控制:公共,最大年龄=600“;在WCF中使用AspNetCacheProfile 我正将缓存应用到企业API中。为了与支持反向代理缓存的负载平衡器兼容,我正在尝试实现类型为“public,max age=600”的缓存控制,wcf,outputcache,cache-control,Wcf,Outputcache,Cache Control,但是,我只能让WCF输出“private,max age=600”,这不适合反向代理缓存 我将以下配置文件设置为location:Server(因为我需要ASP应用程序级缓存),但我也尝试了所有其他位置,但没有一个位置会为我提供公共服务 <caching> <outputCache enableOutputCache="true"/> <outputCacheSettings> <outputCacheProfiles>
<caching>
<outputCache enableOutputCache="true"/>
<outputCacheSettings>
<outputCacheProfiles>
<add name="CacheDefault" duration="600" varyByParam="none" location="Any" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
我甚至启动了一个全新的WCF服务项目,只是为了消除我当前产品代码中可能存在的任何混淆变量,但它仍然输出私有数据
p.S.我可能应该明确指出,我不希望手动覆盖WebOperationContext.current.outgoingresponse.headers。我希望通过配置AspNetCacheProfile快速获得成功
任何帮助都会很好
非常感谢
奥利弗我遇到了不同的缓存技术。我在这里贴了一些我觉得有用的东西
很抱歉,这不适合这种情况。非常感谢,奥利弗
[AspNetCacheProfile("CacheDefault")]
[OperationContract]
[WebGet(UriTemplate = "/GetData/{value}")]
string GetData(string value);