cachingwso2-governance-registrywso2-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

Everything works well: I have a list of endpoints in governance part of my GReg that are added through a Carbon Application Artifact(.car). The ESB mounts this repository to see those endpoints and use them. Perfect!

But, when modifying the endpoints in Greg Console (for example, updating the URL of the endpoint), it's not refreshed in ESB Console. Only after around 10 to 15 minutes, updates appears. I guess, there is Cache configuration to add/update to take in account this remote governance? Any help appreciate please :)


Solution

  • This is due to the caching timeout of ESB which is default set to 15 minutes. When an artifact is deployed in G-Reg node it takes about 15 minutes to be visible in ESB node. You can reduce this caching timeout duration in "/repository/deployment/server/synapse­configs/default/registry.xml" file as belows.

    <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.