简体   繁体   English

WSO2 Enterprise Integrator 6.3.0 缓存中介

[英]WSO2 Enterprise Integrator 6.3.0 cache mediator

i'm using the cache mediator for store a big response from the backend to have less time in subsequent calls.我正在使用缓存调解器来存储来自后端的大响应,以便在后续调用中减少时间。 I have added, before the call, the cache mediator with this configuration:在调用之前,我已经添加了具有此配置的缓存中介:

<cache collector="false" maxMessageSize="100000" timeout="20">
    <protocol type="HTTP">
        <methods>*</methods>
        <headersToExcludeInHash/>
        <responseCodes>2[0-9][0-9]</responseCodes>
        <enableCacheControl>false</enableCacheControl>
        <includeAgeHeader>false</includeAgeHeader>
        <hashGenerator>org.wso2.carbon.mediator.cache.digest.HttpRequestHashGenerator</hashGenerator>
    </protocol>
    <implementation maxSize="100000"/>
</cache>

and before the respond i have added this在回复之前我已经添加了这个

<cache collector="true"/>

i have done this following the documentation here Cache Mediator我已经按照此处的文档缓存中介完成了此操作

If i call the api without the second cache mediator, it answer me but not cache and if i call the api with both the cache mediator it turns in error:如果我在没有第二个缓存中介的情况下调用 api,它会回答我但不缓存,如果我用两个缓存中介调用 api,它就会出错:

"Request messages cannot be handled in a collector cache" “无法在收集器缓存中处理请求消息”

What i wrong?我错了什么? Thank you谢谢

This error comes up when, a cache mediator with collector true is defined in the request flow.当在请求流中定义具有收集器 true 的缓存中介时,会出现此错误。 (ie The cache collector is used before calling a backend server from the ESB). (即缓存收集器在从 ESB 调用后端服务器之前使用)。 Please make sure the flow is correct.请确保流程正确。

Please share the synapse configuration if the issue is not resolved, so that we can help.如果问题没有解决,请分享突触配置,以便我们提供帮助。

I have tried to insert the mediator with colllector true in the response flow but no changes.我试图在响应流中插入带有收集器 true 的调解器,但没有任何变化。 This is my synapse config这是我的突触配置

突触配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM