DataSource for C SDK
7.1.28.98838-0467ac22
|
Active Cache enables a broadcast-style data feed to be turned into an active request-based one. This is done by caching all data in DataSource and handling requests for that data internally.
Active Cache allows a DataSource programmer to send data in a simple way instead of having to write a database or caching mechanism. Handling active requests and keeping track of what objects are being viewed is all handled by the DataSource library.
This feature is useful when one DataSource is feeding multiple DataSource peers and the peers are only interested in a small subset of the overall data.
Type: String Array
Default: None
By default the DataSource Active cache will cache all data broadcast by the DataSource application. Under certain circumstances this may not be desirable. As such, DataSource allows patterns to be specified which should a subject match, it will then be cached. The cache-add-exclude-pattern
is applied to any cache-add-include-pattern
directives to determine whether the symbol should be cached.
For example, given the following:
cache-add-include-pattern ^/L/ cache-add-exclude-pattern ^/L/A
This configuration example will cache all symbols within the /L/ namespace, except those that begin /L/A.
Type: String Array
Default: None
By default the DataSource Active cache will cache all data broadcast by the DataSource application. Under certain circumstances this may not be desirable. As such, DataSource allows patterns to be specified which should a subject match, it will then be cached. The cache-add-exclude-pattern
is applied to any cache-add-include-pattern
directives to determine whether the symbol should be cached.
For example, given the following:
cache-add-include-pattern ^/L/ cache-add-exclude-pattern ^/L/A
This configuration example will cache all symbols within the /L/ namespace, except those that begin /L/A.
Type: String Array
Default: None
Configure an object to be in the active cache
Type: Integer
Default: 1024
Size of Object Cache
Type: Boolean
Default: FALSE
Turn on Active Cache
Type: Function
Default: None
The add-cache-purge
allows the contents to be purged on a periodic basis, for example when an update for a symbol has not be received for a period of time. The option has the following format:
add-purge [regex] [TimeToPurge] [Age]
Where the subject to be purged should match the regular expression regex
. [TimeToPurge]
is the time of the day (minutes past midnight) to perform the purge and Age
is the time in days that the last update for the symbol was received.