简体   繁体   English

WSO2 ESB缓存中介以缓存配置文件

[英]WSO2 ESB Cache mediation to cache a config file

I need to get some configs from a my xml config file. 我需要从我的xml配置文件中获取一些配置。 Due to the high load it is a bad idea to read data from file for each proxy service invocation. 由于高负载,对于每次代理服务调用,从文件中读取数据都是一个坏主意。 I found smooks and cache mediators and I think these two mediators can help me but I don't know how. 我发现了欺骗和缓存中介器,我认为这两个中介器可以帮助我,但我不知道如何。 Also I've heard of VFS transports but since I have the large scale and high load of requests I have to reduce the service invokation or reading from files and handle this problem with some cached data in server RAM. 我也听说过VFS传输,但是由于请求量很大且负载很大,因此必须减少服务调用或从文件中读取数据,并使用服务器RAM中的某些缓存数据来处理此问题。

How about using a database to build a persistent cache, so that you can do a dblookup before reading the file. 如何使用数据库构建持久性缓存,以便可以在读取文件之前执行dblookup。 This mediation logic can be defined within the ESB where the ESB will do a DBlookup before accessing the file. 可以在ESB内定义此中介逻辑,其中ESB将在访问文件之前执行DBlookup。 Similarly for a new entry you can create a cache entry in the DB. 同样,对于新条目,您可以在数据库中创建一个缓存条目。

If you are still interested in cache mediator the following link will help [1] http://soa.dzone.com/articles/wso2-esb-cache-mediator 如果您仍然对缓存介体感兴趣,则以下链接将帮助您[1] http://soa.dzone.com/articles/wso2-esb-cache-mediator

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

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