OP Cache structure

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


OP Cache structure (connectionID; cacheStructure) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
cacheStructureLongintCache structure option (1=Yes)
Function resultLongintError code result for the function

Description

If cacheStructure is not zero, OP Cache structure instructs 4D Open to start caching the 4D Server database structure for this connection (AND for all the other connections to this database) in the client machine's memory. In this case, ALL the routines that need structure information will use the cached information.

To stop caching the structure for a particular database, call OP Cache structure with cacheStructure equal to zero. Caching is off by default.

Caching is very useful for reducing requests sent over the network. However, this means that you expect to have a "frozen" database structure. Unlike the .rex file scheme, a change to the actual structure won't be reflected in the cached information. In addition, caching is local to a session; no structure information is kept on disk.

Before calling OP Cache structure, you must call OP Set option (3;1) to set "cache structure information" to on.

Error Codes

If OP Cache structure executes successfully, it returns 0. Otherwise, this function returns one of the following errors:

Error CodeDescription
10128The 4D Open for 4th Dimension package has not been initialized.
10136The connection does not exist.
10154This command cannot be executed right now.

See Also

OP Get option, OP Set option.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next