Disable caching completely

0

Hi, is there any way to disable caching in Jasperserver completely? My report keeps on getting old data and I need to restart the app server for the reports to reflect the new data. I'm using Hibernate datasource and I've disabled all caching in the hibernate.cfg. I suspect its Jasperserver that is doing the additional caching. (I'm not referring to OLAP caching but the JasperReports caching). Thanks.

james_kwok's picture
Joined: Apr 19 2011 - 9:44am
Last seen: 8 years 10 months ago

5 Answers:

0
bumpz...
james_kwok's picture
Joined: Apr 19 2011 - 9:44am
Last seen: 8 years 10 months ago
1

The only caching I'm aware of occours only in Ad Hoc reports, to disable that cache edit applicationContext-adhoc.xml:


<!-- defaultTimeoutMinutes: the absolute longest time in minutes that a dataset can live in the cache --> 
<property name="defaultTimeoutMinutes" value="0"/> 

<!-- defaultUnusedTimeoutMinutes: the longest time a dataset can stay since the last time it was used --> 
<property name="defaultUnusedTimeoutMinutes" value="0"/> 

ernestoo's picture
9534
Joined: Nov 29 2010 - 11:59am
Last seen: 2 years 4 months ago
0
After some investigation, I realises that this only happens for Hibernate Data Source using hql. JDBC data source using SQL doesn't exhibit the problem. I'm using the sample Hibernate data source provided by the installation package. Anyone encounters this also using the provided Hibernate data source? Any extra steps that I need to do to solve this issue? Thanks.
james_kwok's picture
Joined: Apr 19 2011 - 9:44am
Last seen: 8 years 10 months ago
0
How are you using this data source? ie - how is it configured?
ernestoo's picture
9534
Joined: Nov 29 2010 - 11:59am
Last seen: 2 years 4 months ago
0

I realize this is pretty old post, but just in case anyone would run into the same problem in the future 

From the Ehcache FAQ, you can set the net.sf.ehcache.disabled (-Dnet.sf.ehcache.disabled=true) system property to inhibit Ehcache from adding elements to a cache. Because no elements will be added to the cache, every cache request will result in a cache miss, providing the behavior you're looking for. 

If you just want to disable for hibernate, then ehcache_hibernate.xml is the file could should correctly configure.

 

nthapa's picture
463
Joined: Jan 24 2014 - 9:53am
Last seen: 3 years 8 months ago
Feedback
randomness