简体   繁体   English

使用 GReg 挂载时的 WSO2 ESB 缓存

[英]WSO2 ESB Cache when using GReg mount

I've followed this sample: https://docs.wso2.com/display/ESB490/Governance+Partition+in+a+Remote+Registry我遵循了这个示例: https : //docs.wso2.com/display/ESB490/Governance+Partition+in+a+Remote+Registry

Everything works well : I have a list of endpoints in governance part of my GReg that are added through a Carbon Application Artifact(.car).一切正常:我在 GReg 的治理部分有一个端点列表,这些端点是通过 Carbon Application Artifact(.car) 添加的。 The ESB mounts this repository to see those endpoints and use them. ESB 挂载此存储库以查看这些端点并使用它们。 Perfect!完美的!

But , when modifying the endpoints in Greg Console (for example, updating the URL of the endpoint), it's not refreshed in ESB Console.但是,在 Greg Console 中修改端点时(例如,更新端点的 URL),它不会在 ESB 控制台中刷新。 Only after around 10 to 15 minutes, updates appears.仅在大约 10 到 15 分钟后,才会​​出现更新。 I guess, there is Cache configuration to add/update to take in account this remote governance?我想,是否有缓存配置要添加/更新以考虑到这种远程管理? Any help appreciate please :)任何帮助请感谢:)

This is due to the caching timeout of ESB which is default set to 15 minutes.这是由于 ESB 的缓存超时默认设置为 15 分钟。 When an artifact is deployed in G-Reg node it takes about 15 minutes to be visible in ESB node.在 G-Reg 节点中部署工件后,大约需要 15 分钟才能在 ESB 节点中看到。 You can reduce this caching timeout duration in "/repository/deployment/server/synapseconfigs/default/registry.xml" file as belows.您可以在“/repository/deployment/server/synapseconfigs/default/registry.xml”文件中减少此缓存超时持续时间,如下所示。

<registry provider="org.wso2.carbon.mediation.registry.WSO2Registry"> <parameter name="cachableDuration">15000</parameter> </registry>

But changing this value will also have performance impact.但是改变这个值也会对性能产生影响。 If this value is too low, searching for resources would be done in the database, because most of the resources will be missing in the cache.如果此值太低,则会在数据库中搜索资源,因为缓存中将丢失大部分资源。

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

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