Article number: KB000011
Related blocks:
General
On compiling units/forms/assemblies (Fore or Fore.NET), a file cache, which stores a compiled object version, is created on the local drive. By default, cache is located in the user profile, in the subdirectory "\AppData\Local\Foresight\Prognoz Platform\AsmCache<n>\Mod\<Repository ID>\<assembly number>\". If required, the path to the folder with the stored file cache can be changed, for more details about it read in the Caching article, the Settings Management subsection. The cache speeds up starting of developed applications.
To speed up the first starting of application projects on an industrial scale, compiled objects of development environment can also be stored in the repository base. The Caching Assemblies on the Local Disk checkbox is used to control storing mode of compiled objects in the repository base. This checkbox is located in the Repository Parameters dialog box. On the first start compiled versions of objects are copied into the file cache. After that, the rest of the work is performed with file cache.
By default the Caching Assemblies on the Local Disk checkbox is deselected, the compiled version of object is saved both on the local disk and in the repository.
If different releases of Foresight Analytics Platform are used to work within the same repository, and the compiled assemblies are saved to the repository, forms and units compiled by different releases of Foresight Analytics Platform. This may cause errors like Access Violation or Internal Runtime Error, that occur, for example, when a form is started from another form compiled by other release of the Platform. These errors are caused by incompatibility of formats in different releases of Foresight Analytics Platform.
This may also slow down development process. On compiling objects on the same computer, their compiled versions are saved into the repository base. If these objects are used at the same time to work on another computer, local compiled versions and repository versions are compared. This will cause constant detecting of differences, which in turn will overload server because versions are constantly loaded the local disk and unloaded back to the repository base.
To avoid such consequences:
Select the Caching Assemblies on the Local Disk checkbox at the stage of project development.
Delete complied assemblies from repository. To do this, use the following query:
DELETE FROM b_mod WHERE obj IN (SELECT obj FROM b_obj WHERE cls IN (1537, 1538, 1539))
On developing application code, select the Caching Assemblies on the Local Disk checkbox. This will enable the user to work with code in different releases of Foresight Analytics Platform.
It is not recommended to select the Caching Assemblies on the Local Disk checkbox if the system is installed on the users' workstations belonged to a customer.
Remove compiled assemblies from the repository before commissioning the system to a customer. Then deselect the Caching Assemblies on the Local Disk checkbox and start users' forms to compile and save assemblies in the repository. The users' forms must be started with the version of Prognoz Platform which will also be installed at customer's place in the future. This will prevent compiling objects on decompressing and first starting of the system, as the previously compiled objects are loaded into the file cache.
In order not to prevent users from working in the system, when the system is developed for a customer, it is necessary to select the Caching Assemblies on the Local Disk checkbox on the workstations used for development.
Remember that a modified unit or form is saved when compiled from the development environment. After this it cannot be guaranteed that a previous version of Foresight Analytics Platform can open the saved unit/form.
Developed units and forms are recommended to be arranged and stored inside the assemblies. This reduces the number of created cache files that reduces the number of file system calls and speeds up start of cached objects.
Selection or deselection of the Caching Assemblies on the Local Disk checkbox does not slow down general development process, as in any case file cache is used at the start. This checkbox can have influence only at the first start and decompressing of a new version of application on the customer's computers.
See also:
Developers Knowledge Base | Repository Parameters Dialog BoxRepository Parameters Dialog Box