View Full Version : LCS Caching Question

2019-09-25, 01:02
My question is: if Caching is on under HTTP Settings, when does it get reset? I'm not having any issues with it that I know: just adding to my knowledge base.

For example, will a restart refresh the cache?

If DB_WWWAUTOUPDATE is set to "true" will an app autoupdate reset the cache? If so, is that for only changed files or all files?



2019-09-25, 04:04
Good questions. Let me try and answer for you.

The cache is (mostly) maintained in the browser.

The server will cache dynamically compiled rsp pages so that they aren't regenerated repeatedly.

Lets look at how browser caching works.

When a url is requested in the browser the browser will look in its cache using the url string as a key to return the cached content.

If there is no match a request is made to the server.

Bear in mind that all images and all JavaScript and css are loaded this way.

In the LCS when a request is made the LCS will firstly send an http header to the browser followed by the data.

If you have disabled caching (which you should do while developing as the files may change) then the LCS will include headers that tell the browser not to cache the content.

All data requests and expressions are not cached. Obviously.

When using the app center, clicking a tile to load an app will postfix ?_v=xxx where xxx is the version number of the app which is bumped up each time the app index.html file is generated by the app builder. This prevents old app code being run when the LCS auto updates apps.

So if you always want a url to be loaded from the server you must postfix a unique argument to it.

So on a development machine I recommend you run with caching off.

On a production LCS you can run with it on.

The web browser will only clear its cache when asked to in its menus. Otherwise it remains.

2019-09-25, 22:06
Hi Barry,


Now that I know what to look for, it appears that any URL with a querystring that varies will bust the cache. That makes the case for POSTing variables rather than using querystrings because assuming that the querystrings are never the same, the cache will be busted on every call. Assuming of course the Caching is on in the LCS, which (except for rsp pages) is really the "tell browser to not cache unless set": control.

I never would have guessed. :)



2019-09-26, 01:17
Yes but you can't use POST requests from a link in a document or an email (in your case).