Jump to content
Changes to the Jaspersoft community edition download ×

Clearing cache on user browser


Recommended Posts

There is an intermittent issue with our UI running Jaspersoft reports where the browser hangs.  The fix seems to be to clear the browser cache, or to open an Incognito window which starts with a new empty cache.  Need your help to research whether there are any options on the Jaspersoft server that tell the browser not to cache?  Is there a way to send any HTTP headers or Jaspersoft specific instruction to the browser that controls caching?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

Cache control can done through applicationContext-webapp.xml file.

Could you try to add below lines for cache control in file /WEB-INF/applicationContext-webapp.xml.

<bean p:method="GET" p:urlPattern="/rest_v2/reportExecutions/.*" class="com.jaspersoft.jasperserver.war.httpheaders.HeadersRule"> <property name="headers"> <list>

<bean class="org.apache.http.message.BasicHeader">

<constructor-arg value="Cache-Control"/>

<constructor-arg value="no-cache,no-store"/>

</bean>

<bean class="org.apache.http.message.BasicHeader">

<constructor-arg value="Pragma"/>

<constructor-arg value="no-cache"/>

</bean>

</list>

</property> </bean>

 

Try adding it under <property name="headersRules">

 

Link to comment
Share on other sites

  • 8 months later...

Hello, were you able to solve this issue?. I am currently facing the same problem at my College, we have reports that are generated by URL, but we have to clean cache of our users every once in a while. Since we have around 1000 users or machines it becomes difficult to do this every time. I checked the applicationContext-webapp.xml  but im not able to find the property name="headersRules" . I would be extremely thankful if you could provide any advice.

 

-David.

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