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

Adding user and tenant info to adhoc cache key


waalp

Recommended Posts

 We have the adhoc cache enabled, but we are using a custom query executer to retrieve the data. For jasperserver it looks like it's using one datasource while instead it could be a different one then before.

 

Now is there a way to add the LoggedInUser and the Tenant of the logged in user to the adhoc cache key. I know I could add them as parameters to a topic (and this works) but I would like or

A) the query executer to add this parameters automatically

B) make the adhoc cache configuration look at the logged in user and tenant by default by adding them to the adhoc cache key

 

Is this possible ?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

We found out how to do this (atleast for us this works)

One way of doing is, is to create your own version of the DefaultCacheKeyInterceptor, and add a User object (even if there is none specified in the report).

Then edit the applicationContext-datarator.xml, and change the class entry of the keyInterceptor bean definition to your own class.

 

Regards,

Peter

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