Results 1 to 4 of 4

Thread: LCS Caching Question

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,143

    LCS Caching Question

    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?

    thanks,

    Hank

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    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.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,143
    Hi Barry,

    Aha!

    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.

    Thanks,

    Hank
    Last edited by HankFay; 2019-09-25 at 22:14.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Yes but you can't use POST requests from a link in a document or an email (in your case).
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us