Jump to content
JasperReports Library 7.0 is now available ×

JasperServer cache and how to flush olap cache


joeri

Recommended Posts

Hi,

I have a question regarding caching on JasperServer CE 3.7.1. The clients are using the Excel ODBO connect plugin. The data is loaded on a daily basis using JasperETL.

The problem I have is that the data from my clients isn't refreshed after a daily load. Even if the users do a refresh of the pivotTable data in excel it is't updated with the latest changes in the database.  (I have to flush manually using the menu.

I've tried adapting cache settings in mondrian.properties (mondrian.rolap.star.disableCaching=true) and in my cube xml file (caching="false") but the drop in performance is huge, so I'm looking for another solution.

If you're using JSP to display data to your users, you could call the "flush OLAP cache" function: com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapManagementServiceImpl()).flushOlapCache(); but in my case I'm using excel.

I was thinking there maybe was a way to call this function using JasperETL, that way I could include it in the daily load.

Regards

Joeri

 



Post Edited by joeri at 02/21/2011 08:39
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This is the very basic workaround I made:
After the ETL process, I call a script that will flush the cache.

The Java class that will call the flushOlapCache() method and the sh script:

Code:
import com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapManagementServiceImpl;public class FlushCache {    public static void main(String[] args) {        new OlapManagementServiceImpl().flushOlapCache();        System.out.println("Flushing cache... Done.");    }}## Run this script to flush the OLAP cache## Compose classpathfor i in /home/jasperserver/jasperserver-ce-3.7.1/apache-tomcat/webapps/jasperserver/WEB-INF/lib/*doCP="$CP:$i"done# run java commandjava -cp "$CP" FlushCache

Post Edited by joeri at 02/22/2011 08:16
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...