How to automatically cleanup local and proxy cache?

5
Is there a way to automatically cleanup local and proxy cache on local machines and proxy servers when/after deploying a new application version. To garantee the right behaviour of the application endusers have to do this manually.
asked
3 answers
6

There's no way in which you can "force" users to clear their local cache, clearing the proxy cache (I assume you're running a proxy server) depends on the server you're using.

*Edit to respond to Rene's answer (btw, please update your answer in the future instead of adding an answer, this makes it easier for other people to understand what the question is about)

One thing you could do is add a message to the frontpage every time the site is updated, telling people to empty their cache. The alternative is to explicitly set the TTL on documents in the HTTP header. I'm not completely familiair with this technique, but you should be able to tell the server to tell the clients that they should never cache the pages. The obvious problem is that this causes a lot of extra serverload, which is something you might not want with the mendix client (the 2.4 client weighs in at ~570 kB)

answered
1

We are servicing a large number of different organizations, Some with, some without proxies. Every time we deploy a new version of our app we get a lot of calls concerning java/xas errors, json errors, forms that don't refresh / do not show new functionality, etc. Is their no way to let the endusers environment know it should automatically clear its cache?? How do other Saas Solutions do this??

answered
0

As Achiel stated, caches can not be controlled centrally. By modifying the HTTP headers (in the webserver configuration) one can reduce the TTL (time to live), a lower TTL causes users to see changes earlier, but causes a higher load on the server. However, such changes must be made before deploying a new app, if clients have already cached their pages they won't inspect new headers.

A way to ensure that the cache is not used when you deploy a new app, is to load the application via another url (DNS). (a simple redirect page running on the desired URL might achieve this). This page should redirect to the new deployment, which should run on another URL, although it might be the same server.

answered