Jump to content
We've recently updated our Privacy Statement, available here ×
  • Share Ad Hoc Cache Dataset Across Different Users


    asimkin
    • Features: Ad Hoc, Cache Version: v7.1 Product: JasperReports® Server

    Use case

    Customer created a report from Ad Hoc View without any parameters/filters.

    They noticed that if the report executed by different users, data retrieved from underlying database instead of Ad Hoc Cache.

    Customer would like to change this behavior and use cached data regardless of user who runs the report.


    Resolution

    By default, datasets for each user are cached separately. A parameter in the cache key identifies the user.

    This per-user caching can result in duplicate datasets and impaired performance when different users run the same query.

    You can configure JasperReports Server to share cached datasets across users by editing configuration file

    /WEB-INF/applicationContext-datarator.xml[/code]

    The following code configures the cacheKeyInterceptor bean to ignore logged-in users' credentials when

    creating the cache keys:

    <value>LoggedInUsername</value>
    <value>LoggedInUser</value>
    

    Theses parameters should be uncommented

    Please refer to the printcreen of the Ad Hoc Cache view with default properties and commented out ones

    sharedadhoccache.png.d782a51b0623b93d4a65d5c107be4654.png

    Solution tested with TIBCO JasperReports® Server v.7.1.0


    sharedadhoccache.png.d05cb65b35ad64398327f176dce6ecd4.png


    User Feedback

    Recommended Comments

    There are no comments to display.



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