Jump to content
We've recently updated our Privacy Statement, available here ×

Caching database results


nicholas

Recommended Posts

I'm sure this must come up regularly, but I've searched the forum and JS-Ultimate-Guide.2.0.0.pdf with nothing found. Please do just direct me at the last time someone asked if I just missed it!

 

Are database results cached? There is no mention in the JasperServer Pro 2.1 interface, as far as I can tell. The question specifically relates to when this happens:

 

View a report

'Export' the report as a PDF or CSV, etc.

[/ol]

 

During that export, is the SQL query run again? What if the query takes a long time to run?

 

I've tried to find out myself with wireshark, watching the SQL traffic, but I don't see clear results.

 

Thanks!

 

Nick

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Yes, the report result is cached. So when you click the export button, then it will use the cached report to produce the output. But you will notice its takes some time (depends size) because of the desired output result (excel / pdf). The cached result need to be 'converted' to your export format before you will able to open, that why it takes some time.

 

But im not sure whether if someone else generate same report (with same input parameters), the system will give cached report, or will generate from scratch.

Link to comment
Share on other sites

When running reports through the JasperServer UI, the abstract result of a report, the JasperPrint object, is stored in the user session. By default, the JasperPrint object is 'virtualized', so that the full content is not in memory. As anandharaj indicates, the report is not rerun to get a different output type (PDF, Excel etc) - the JasperPrint object is rendered. If the parameters are changed, the report with the underlying query is rerun and a new JasperPrint object is created. We do not cache report output across users.

 

The JasperPrint objects are stored in a LRU cache in the user session. By default, up to 5 are kept. This allows the back button in the browser to work without rerunning the report, and also if the page is configured to create a new tab or window when running a report, potentially having multiple reports up at once.

 

 

There is no report caching done during web services, which are stateless.

 

When creating/editing an ad hoc report in JasperServer Pro, the data is cached across users based on the query + parameters. This is fine as the data is only used as an example for report layout. This data cache times out on a period basis, based on last activity.

 

 

Sherman

JasperSoft

 

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

  • 1 year later...

What if i do nt want cached data?

my database is getting updated quite frequently , how to get the updated data with same input condtion and query in adhoc report?

The report is having date as input control, i did some operation to populate database on same date, The report is still showing all the privious records as i am still running for same date. I need to restart the jasperserver to get the updated records.

Can any one help on this, its urgent??

Link to comment
Share on other sites

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...