New in version 6.1.0: See the new features.
Server cache service SQL Queries¶
These are the Sculptort custom SQL Queries added to the SQL Engine parser. An example is provided.
Contents
Clean¶
Cleans the cache, meaning it stops any current caching process and removing all the files from the cache list of files, leaving all the global options unchanged (synchronous and thread priority):
CACHE CLEAN
Commit¶
Commit the cache, which means load the specified files into memory. Taking into account the global options. The cache file list is emptied when the commit ends (even if it fails):
CACHE COMMIT
Wait for commit finish¶
If the cache is being committed, this command waits for the commit to finish (only usefull on the asyncronous case):
CACHE WAIT
Cache options¶
To set a global option of the cache:
CACHE SET <OptionName> = <OptionValue>
These are the global options:
SYNCHRONOUS |
TRUE (default) means wait on CACHE COMMIT until the files are loaded in memory, while FALSE means start a background thread which loads the files. Leaving the main client thread to continue working. |
||||||||||||||
THREAD_PRIORITY |
Of the commit operation:
|
Add a file to cache¶
To add files to the cache list:
CACHE ADD “FilePathName” [OPTION <FileOption> [AND <FileOption>]*] [INDEX “indexName” [, “IndexName”]*]
The FileOption’s options are:
CFO_KEY_FILE |
The FilePathName refers to the data file. And in that case the INDEX list can be used (specifying the indexes to be also added to the cache file list) |
CFO_ALL_INDEX |
All the indexes (main and secondary) are also added to the cache. Otherwise only the main index is also added to the cache file list. |
CFO_INDEXES_ONLY |
The data file is not added to the cache file list. |
Remove a file from the cache file list¶
Remove files from the cache file list:
CACHE REMOVE “FilePathName” [OPTION <FileOption> [AND <FileOption>]*] [INDEX “indexName” [, “IndexName”]*]
The FileOption’s options are:
CFO_KEY_FILE |
The FilePathName refers to the data file. And in that casethe INDEX list can be used (specifying the indexes to be also removed from the cache file list) |
CFO_ALL_INDEX |
All the indexes (main and secondary) are also removed from the cache. Otherwise only the main index is removed from the cache file list. |
CFO_INDEXES_ONLY |
The data file is not removed from the cache file list. |
Cache service status¶
To view the current cache service status:
CACHE STATUS
This query returns one row result set with this values:
CSRV |
Cache Service Return Value. 0 and 1 means OK. |
|||||||||||||||
STATUS |
|
|||||||||||||||
TOTAL_FILES |
Total number of files in the cache list |
|||||||||||||||
COMMITTED_FILES |
Number of committed files |
|||||||||||||||
ERROR_FILES |
Number of files that could not be cached |
|||||||||||||||
MESSAGE |
Text string with the status or other information |
RELATED TOPICS |