Invalidating Server Cache in DBLoad

About Invalidating Server Cache in DBLoad

The InvalidateCache command is used to clear the cache area.

Syntax

InvalidateCache {[SERVER]}

Explanation

DBload connects to the database using the CES Java Server. The CES Java Server uses the internal cache information for reuse as in the case of Metamodel cache.

During import using DBLoad, the cached information may need to be cleared in order to complete the import activity without any errors.

Note: Importing a model in DBLoad format inserts the invalidateCache statements at the appropriate places, so that the entire file can be subsequently imported without manual intervention.

The InvalidateCache command can be keyed in the file like any other transaction statement. The keyword SERVER is the default option to this command. The default InvalidCache {SERVER} command, clears all the caches on the server.

Additional options for the InvalidCache will be introduced to support invalidating specific Caches in forthcoming releases.

In a scenario where you have a locale with the date format of MM-DD-YYYY, If you create a new locale with the date format DD-MON-YYYY and insert the data, an error message appears, because the server cache has the old date format (MM-DD-YYYY) and you need to clear the cache area to fetch the new date format from the database.

The invalidateCache removes all the caches on the server. This will affect other connections/users already connected to the server and performing transactions. Affected users will receive a server error to indicate that the cache is out of sync. Reconnecting to the server will help you to overcome this problem.

Example

InsertRandom S_LOC_CLASS {
S_LOC_CURRENCY_POSITION = "B";
S_LOC_DIGIT_SEPARATOR = "<,>";
S_LOC_DATE_FORMAT = "DD-MON-YYYY";
S_LOC_LANGUAGE_CODE = "AMERICAN";
S_LOC_TIME_FORMAT = "HH24:MI:SS";
S_LOC_ID = "9090";
S_LOC_RADIX_POINT = "C";
S_LOC_FALSE_WORD = "NO";
S_LOC_TRUE_WORD = "YES";
objectPtr S_LOC_CURRENCY_UOM_ID {
class = S_UOM_TABLE;
S_UOM_NAME = "Dollar";
S_UOM_DISPL_SYMBOL = "$";
}
objectPtr S_LOC_TIMEZONE_ID {
class = S_TMZ_CLASS;
S_TMZ_TIMEZONE = "PST";.}
}
InvalidateCache {SERVER}
InsertRandom CLASS_NAME {
DATEPROP1 = "12-JAN-1975";

...

...

}