JasperServer cache and how to flush olap cache

0

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
joeri's picture
48
Joined: May 6 2010 - 5:15am
Last seen: 9 years 10 months ago

2 Answers:

0

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 classpath
for i in /home/jasperserver/jasperserver-ce-3.7.1/apache-tomcat/webapps/jasperserver/WEB-INF/lib/*
do
CP="$CP:$i"
done
 
# run java command
java -cp "$CP" FlushCache</td></tr></tbody></table><br><br>Post Edited by joeri at 02/22/2011 08:16
joeri's picture
48
Joined: May 6 2010 - 5:15am
Last seen: 9 years 10 months ago
0

Hi,

i didn't understand very well your solution.

Can you explain step by step please.

i have the same issue for months now.

tnaks for your help

atoure's picture
7
Joined: Sep 23 2009 - 2:10am
Last seen: 10 years 6 months ago
Feedback
randomness