Force clear cache from navigator when deploy changes in production

Hello guys,

Can I force the navigator to clear cache from files (controller, html, css and client.startup.js) every time I do some changes and deploy to production?

I cant instance JS files like: src="myfile.js?1500, because Canvas already does this automatically .

I also tried to add some tags in header and didint worked:

meta http-equiv=“Cache-Control” content=“no-cache, no-store, must-revalidate”
meta http-equiv=“Pragma” content=“no-cache”
meta http-equiv=“Expires” content=“0”

Tks.

Hi @murilokenji,

Is this the situation that you were checking on:


Paul

Hi plim,

I have almost 100 users using the system, I can’t configure “disable cache” in the browser for everyone.

Is there any solution to force clear cache when there is any change in canvas?

tks.

Hi @murilokenji,

As discussed in that thread, the caching of files are all being handled by the browser.

Canvas sends an expiration header to the browser, and by default it is 60 minutes to expire.

You could change this temporarily though via WEB-INF/web.xml. Search for ExpiresFilter section and update the values in there. You will need to restart the Canvas Application Server service afterwards.

Just a note that the caching is used by the browser to speed up websites / loading. Setting it to a lower value will also mean that it will keep on reloading everything as it reaches the page expire time.

Also note that this is a temporary update and will be overridden whenever you upgrade your Canvas application.

It will be advisable to balance out caching between development and deployment.


Paul