简体   繁体   English

如何在Pentaho中清除缓存

[英]How to clear cache in Pentaho

I am using Pentaho 5. My dimensions keep changing frequently and I need the changes to be applied to the dashboard, this is not possible because Pentaho keeps caching. 我正在使用Pentaho 5.我的维度经常变化,我需要将更改应用到仪表板,这是不可能的,因为Pentaho一直在缓存。 I have created the cube using the datasource wizard and the querys using mdx over mondrian jndi. 我使用数据源向导创建了多维数据集,并使用mdx在mondrian jndi上查询。 Even though I set the property Cache to false or set cache duration doesn't seem to work. 即使我将属性Cache设置为false或设置缓存持续时间似乎不起作用。 Is there a API that I can use with mondrian jndi to clear cache? 是否有一个API可以与mondrian jndi一起用来清除缓存? Or are there any property files that I should change? 或者我应该更改任何属性文件? Please help. 请帮忙。

In Pentahoo 7 the "Clear Cache" option is in a different Menu: Pentahoo 7中 ,“Clear Cache”选项位于不同的菜单中:

Tools -> Database -> Clear Cache 工具 - > 数据库 - > 清除缓存

If you are using Database lookup and if you are getting older fields, cleaning cache can actually solved the problem. 如果您正在使用数据库查找,并且如果您正在使用较旧的字段,则清理缓存实际上可以解决问题。 It worked for me. 它对我有用。

You can do it manually inside Pentaho User Console: Tools -> Refresh -> Mondrian Schema Cache. 您可以在Pentaho用户控制台中手动完成:工具 - >刷新 - > Mondrian架构缓存。

Or you can make schedule for refreshing cache: find clear_mondrian_schema_cache.xaction inside your installation and schedule it. 或者您可以制定刷新缓存的计划:在安装中找到clear_mondrian_schema_cache.xaction并进行计划。

Option 1: You can read http://javadoc.pentaho.com/bi-platform500/webservice500/ for api details. 选项1:您可以阅读http://javadoc.pentaho.com/bi-platform500/webservice500/获取api详细信息。
And also you can refresh Reporting Metadata Cache via web service, you can use the following web service call: http://localhost:8080/pentaho/api/system/refresh/metadata 此外,您还可以通过Web服务刷新报表元数据缓存,您可以使用以下Web服务调用: http:// localhost:8080 / pentaho / api / system / refresh / metadata


Option2: You can navigate to \\biserver-ee\\tomcat\\webapps\\pentaho\\WEB-INF\\classes and change the configuration file "ehcache.xml" 选项2:您可以导航到\\ biserver-ee \\ tomcat \\ webapps \\ pentaho \\ WEB-INF \\ classes并更改配置文件“ehcache.xml”

<cache name="report-dataset-cache"
maxElementsInMemory="50"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="1"
timeToLiveSeconds="2"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="1"
/>

If you have done that and still no positive answer, I think you have not restarted the BA server. 如果您已经这样做但仍然没有正面答案,我认为您还没有重新启动BA服务器。 If the issue still exists comment below. 如果问题仍然存在,请在下方注释。

There are 2 options 有2个选项

  1. One is to schedule "clear mondrian schema" on ba server but for that to happen , you need to get clear_mondrian_schema.xml from pentaho-solutions/systems folder and upload it in some folder that you can access on ba server. 一种是在ba服务器上安排“清晰的mondrian模式”,但为了实现这一点,你需要从pentaho-solutions / systems文件夹中获取clear_mondrian_schema.xml并将其上传到你可以在ba服务器上访问的某个文件夹中。 You can then use normal schedule file options to achieve you want. 然后,您可以使用正常的计划文件选项来实现您的需求。 This put a lof of load on BA server though. 这虽然给BA服务器带来了一小部分负载。

  2. My second recommendation is if you are using cubes/schema and building using schema workbench, you can turn the caching off. 我的第二个建议是,如果您使用多维数据集/架构并使用架构工作台构建,则可以关闭缓存。 If your database is architecturally good and your schemas all well defined, user will get updates/new data as soon as they refresh. 如果您的数据库在体系结构上很好并且您的模式都已定义良好,则用户将在刷新后立即获取更新/新数据。

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

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