nicholas Posted December 24, 2007 Share Posted December 24, 2007 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 More sharing options...
anandharaj Posted December 27, 2007 Share Posted December 27, 2007 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 More sharing options...
nicholas Posted December 27, 2007 Author Share Posted December 27, 2007 Thanks for this confirmation. Do you know where I could find more information? I'd like to know how to monitor this cache, how long items last for, how large it could get, how to flush it early, etc. Much thanks, Nick Link to comment Share on other sites More sharing options...
swood Posted January 4, 2008 Share Posted January 4, 2008 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. ShermanJasperSoft ShermanJasperSoft Link to comment Share on other sites More sharing options...
nicholas Posted January 4, 2008 Author Share Posted January 4, 2008 Thank you for this detailed answer. Link to comment Share on other sites More sharing options...
ravi_sati Posted July 16, 2009 Share Posted July 16, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now