Caching Files
To improve the time-to-first label and performance in general, Loftware Automation supports file caching. When loading the labels, images and database data from network shares, you might experience delays while printing the labels. Loftware Automation must fetch all required files before the printing process can begin.
There are two levels of caching that complement each other.
-
Memory cache: Memory cache stores the already used files. The labels that have been used at least once are loaded in the memory cache. When a trigger requests a printout of the same label, the label is immediately available for printing process. Memory cache is enabled by default. Its contents are cleared after you remove or reload a configuration. The label file is checked for changes for each Open Label action. If there is a newer label available, it loads automatically, replacing the old version in the cache.
Note
After a label is not in use for 8 hours, it is offloaded from the memory cache.
-
Persistent cache: Persistent cache stores data to disk – its role is to provide medium term storage for files. Caching is managed per file object. After a file is being requested from the network share, the service first verifies if the file is already present in cache, and uses it. If a file is not in the cache, it is fetched from network share and cached for future use. The cache service continuously updates cache contents with new versions of files. You can configure the time intervals for version checking in Options menu.
Prolonging the Time Period for Label Offloading
After a label is used for the first time, it is loaded in the memory cache. The label becomes available for instant printing the next time it is required. Memory cache housekeeping process removes all labels that haven't been in use for 8 hours or more.
To prolong the time interval in which labels are offloaded from memory cache, do the following:
-
Navigate to the Loftware Automation System folder.
%PROGRAMDATA%\Loftware\Loftware
-
Make a backup copy of the file product.config.
-
Open product.config in a text editor. The file has XML structure.
-
Add the element Common/FileUpdater/PurgeAge.
-
This parameter defines the number of seconds that define the time frame for keeping labels in memory cache. Loftware Automation keeps track of the time when each label was used for printing for the last time. When that time frame reaches the defined threshold, the labels are unloaded from memory.
Note
Default value: 28800 (8 hours). Maximum value is 2147483647.
The product.config file should have the following contents:
<?xml version="1.0" encoding="utf-8"?> <configuration> <Common> <FileUpdater> <PurgeAge>28800</PurgeAge> </FileUpdater> </Common> ... </configuration>
-
After you save the file, Loftware Automation Service automatically applies the setting.
Enabling Persistent Cache

To enable and configure persistent cache, open the Option, select Loftware Automation and enable Cache remote files.
-
Refresh cache files: Defines the time interval in minutes in which the files in the cache will be synchronized with the files in the original folder. This is the time interval that you allow the system to use the old version of the file.
-
Remove cache files when older than: Defines the time interval in days for removing all files in cache that haven't been accessed for the specified time duration.
Loftware Automation uses the following local folder to cache remote files:
%PROGRAMDATA%\Loftware\Loftware\FileCache
Note
File caching supports label and picture file formats. After you enable file caching, restart Automation service to make the changes take effect.
Forcing Reload of the Cache Content
Loftware Automation automatically refreshes cache content upon the defined time interval. Default value is 5 minutes.
To manually force cache reloading, do the following:
-
Open Automation Manager.
-
Locate the configuration that contains the trigger for which you want to force-reload labels.
-
Right-click the configuration.
-
Select Reload Configuration.