Announcement

Collapse
No announcement yet.

Caching of tpl templates unclear

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Caching of tpl templates unclear

    Dear all,

    I am running the latest version of EspoCrm 8.4.2 on my own webspace.
    After changing from EspoCRM V7 to 8.4.2 it seems that the caching mechanisms changed.

    The applicationTimeStamp in config.php is used to extend the url for a tpl by adding ?{applicationTimeStamp}, e.g. dashboard.tpl?r=1732465646
    Reference to them are saved in the cache-storage.

    My problem:
    Changing the applicationTImeStamp will force to load latest version of tpl which is fine, but only as long as you do not clear the browser cache.
    When you clear the browser cache, tpl calls with the same applicationTimeStamp will render not the correct content/version of the template.
    It seems that the first version of tpl is used all the time once browser cache is cleaned.

    If i deactivate caching functionality in admin, for sure there is no probelm correct tpl will be rendered correcytly all the time.

    My Question:
    How can i ensure that tpl caching will not fall back to origin tpl content/version if user is deleting browser cache?

    Thank you for your help in advance!

  • #2
    Hi,

    The application timestamp can be updated with the console command: https://docs.espocrm.com/administrat...-app-timestamp

    Note that when using the ext-template for developing, updating timestamp is not a necessity.


    Comment


    • #3
      HI yuri,

      first thank your for your prompt reply.
      yes I know but my problem is that the update of the application timestamp will loose its sense if the user cleans his browser cache.

      Maybe I should describe what i do:

      - changing code in original dashboard.tpl - uploading it via filezilla to my webspace in the correct Espo folder
      - incrementing application timestamp +1
      - user is seeing correct new dashboard.tpl rendering
      - user is cleaning browser cache
      - user does not see my changes as fromer dashboard.tpl is getting rendered, not the current one

      For sure if I increment application timestamp +1 again, user will see correct dashboard.tpl rendering, but only as long as he is not cleaning up his browser cache.

      Or is there any other dependency about the application timestamp, should it be somehow aligned with another property and incrementing +1 is not enough?

      Comment


      • #4
        It could be because of new template bundling: https://github.com/espocrm/espocrm/b...c/app.js#L1413

        client/lib/templates.tpl contains all templates.

        Comment

        Working...
        X