Features, discussions, tips, tricks, questions, problems and feedback

Graphic form caching and why sometimes operator keeps using older graphic forms?

In very specific set of steps there might be a situation when uploaded to server new versions of graphic forms are not displayed by Operators instead using older versions. This is because of mechanism called DataElementCachingEnabled (available to switch on or off in MAPS/Adroit Config Editor).

Operator, when caching is enabled, initially downloads graphic forms (upon opening it, not all at once) from server and then stores it in C:\ProgramData\Adroit Technologies\MAPS\Caching or C:\ProgramData\Adroit Technologies\Adroit\SmartUI\Caching folders. Then, after each revisit to such downloaded graphic form it compares file attribute last modified between server version and cached version. If cached version is newer or the same, it uses it (saving bandwidth and making load of graphic form faster), otherwise redownloads from server.

The last modified attribute is set on cached version of graphic forms to moment of initial download. This sometimes may cause discrepancy and confusion. Consider situation:

  • 01 January – initial project is uploaded to server. Operator enters graphic form named MAIN also downloading it to cache at the same day.
  • 02 January – some changes are made to graphic form named SECOND existing within the project. These changes are done on test environment to later be uploaded to server. The last modified attribute of this graphic form is therefore set to 02 January.
  • 03 January – Operator opens SECOND graphic form, thus downloading it to cache and having last modified attribute set to 03 January.
  • 04 January – changes made on 02 January are uploaded to server. However new version of graphic form SECOND WILL NOT BE USED BY OPERATOR, because it already has cached version of it with last modified attribute newer than the actual “newer” version of graphic form.

To fix such situations there are 2 possible ways:

  1. Clear Caching folder (C:\ProgramData\Adroit Technologies\MAPS\Caching or SmartUI respectively). Simply delete all contents inside Caching folder on Operator machine and switch graphic form inside Operator to redownload new versions of the graphic forms.
  2. Disable DataElementCachingEnabled property in Advanced Operator part of Config Editor completely. Loading of graphic forms will take longer in such situation as it will be every time downloaded from server.