简体   繁体   中英

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. I have created the cube using the datasource wizard and the querys using mdx over mondrian jndi. Even though I set the property Cache to false or set cache duration doesn't seem to work. Is there a API that I can use with mondrian jndi to clear cache? Or are there any property files that I should change? Please help.

In Pentahoo 7 the "Clear Cache" option is in a different Menu:

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.

Or you can make schedule for refreshing cache: find clear_mondrian_schema_cache.xaction inside your installation and schedule it.

Option 1: You can read http://javadoc.pentaho.com/bi-platform500/webservice500/ for api details.
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


Option2: You can navigate to \\biserver-ee\\tomcat\\webapps\\pentaho\\WEB-INF\\classes and change the configuration file "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. If the issue still exists comment below.

There are 2 options

  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. You can then use normal schedule file options to achieve you want. This put a lof of load on BA server though.

  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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