News configuration
The following configuration items define how Transformer manages news headline data.
add-newsconfig
add-newsconfig specifies purging settings for a particular news stream. Transformer retains newly received news headlines in a memory cache. Headlines can be purged (deleted) from the cache at daily intervals (as specified by news-purge-time), and also when the cache exceeds a given size.
Also see, news-purge-days and news-max-headlines.
Syntax:
add-newsconfig symbol [string] purge-days [double] max-headlines [integer] end-newsconfig
| Option | Type | Default | Description | ||
|---|---|---|---|---|---|
integer |
|
The maximum number of headlines that that Transformer caches in memory for this news stream. When the maximum number of stored headlines for this stream is reached, the arrival of a new headline causes the oldest headline to be deleted. This option overrides the setting of
|
|||
double |
|
The number of day’s worth of headlines for this news stream to retain during a daily purge of news headlines from Transformer’s cache, counting back from when the purge occurs. This option overrides the setting of To enable daily purging, specify |
|||
string |
[none] |
The symbol that identifies this news stream. |
news-max-headlines
news-max-headlines specifies the maximum number of new headlines that Transformer caches in memory for a particular news stream. When the maximum number of stored headlines is reached for a stream, the arrival of a new headline causes the oldest headline to be deleted.
The value of this item can be overridden for a specific news stream by the max-headlines option of an add-newsconfig item for that stream.
If you don’t set a value for news-max-headlines, you should set news-purge-time instead, otherwise headlines will never be deleted from the cache, and Transformer could fail by running out of memory.
|
Syntax: news-max-headlines <number-of-headlines>
Type: integer
Default value: -1 (unlimited: headlines are never deleted from the cache, unless news-purge-time is set.)
news-purge-days
news-purge-days specifies the number of day’s worth of headlines to retain for each news stream during a daily purge of news headlines from Transformer’s cache, counting back from when the purge occurs.
The value of this item can be overridden for a specific news stream by the purge-days option of an add-newsconfig item for that stream.
To enable daily purging, specify news-purge-time.
Syntax: news-purge-days <days>
Type: integer
Default value: 0 days (all headlines are purged)
news-purge-time
news-purge-time schedules a time of day, in minutes after midnight, to purge old news headlines from Liberator’s cache.
If you don’t set a value for news-purge-time, you should set news-max-headlines instead, otherwise headlines will never be deleted from the cache, and Transformer could fail by running out of memory.
|
To specify the maximum age of headlines to retain during a purge, set news-purge-days.
Syntax: news-purge-time <minutes-after-midnight>
Type: integer
Default value: -1 (Purging of news headlines is disabled, in which case, if it’s defined, news-max-headlines limits the number of headlines stored.)