Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to tell whether Ad Hoc cache is on or off


    Jim W
    • Features: Ad Hoc, Cache Product: JasperReports® Server

    Issue:

    The following is a procedure to check whether Ad Hoc Cache is on or off


    Resolution:

    1. Open "WEB-INF/applicationContext-datarator.xml"
    2. Set defaultTimeoutMinutes to 60
    3. Set defaultUnusedTimeoutMinutes to 20
    4. Save the file and start Tomcat
    5. Start jasperserver and login as superuser
    6. Go to "Manage" -> "Log Setting"
    7. Turn on "DEBUG" for Ad Hoc cache activity Enter "com.jaspersoft.commons.datarator.DataSetCacheImpl" at the text box at the bottom of the page and select "DEBUG"
    8. Enter "com.jaspersoft.commons.datarator.DataSetCacheImpl" at the text box at the bottom of the page and select "DEBUG"
    9. Create the report and run the report
    10. You should able to see some debug statements that end with "found" or "not found". Those are the debug statements from cache look up.

       

      For example,

       

      2011-07-07 12:47:25,261 DEBUG DataSetCacheImpl,"http-bio-8080"-exec-1:104 - {query=select `users`.`f irst_name` as `users_first not found

      2011-07-07 12:47:25,377 DEBUG DataSetCacheImpl,"http-bio-8080"-exec-1:104 - {query=select `users`.`f irst_name` as `users_first found

       

    11. Open "WEB-INF/applicationContext-datarator.xml"
    12. Set defaultTimeoutMinutes to 0
    13. Set defaultUnusedTimeoutMinutes to 0 
    14. Repeat steps 4 to 9
    15. Copy the log to a text editor and do a search on the log file.

       

      You should not able to find any statement ends with "found" or "not found". (It is because JS disables in-memory cache if deafaultTimeoutMinutes is set to less than or equals 0)

     


    Ref. Case #00021586 -- 01:31, 2 September 2011 (UTC)

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...