Spectre Cache Refresh Process Node
The Spectre Cache Refresh node is a Production process node that looks at every cache entry and reruns any that are stale.
It is a best practice to use this node as a final step in a production process that builds cBases. It can ensure that frequently run user queries deliver up-to-date data quickly. This node refreshes all Spectre dives in all projects on the server.
Cache refresh followed by a sweep removes stale entries that can accumulate. Stale entries are those that DiveLine will not use because files they depend on have timestamps newer than the entry. See Spectre cache Options for more information.
The Spectre Cache Refresh node has two panes where you set attributes.
You set attributes for the Spectre Cache Refresh node in the node attributes pane.
Attribute | Description |
---|---|
Name | Specify a descriptive name for the node. Lower case names maximize usage of the available space. |
Max Age (Hours) | Set the number of hours after which unread cache entries are removed. |
Max Idle Time (Hours) |
Set the number of hours that cache entries are unused before removal. This is a string field that accepts parameters, but the string must parse to an integer before the node runs. If the value is blank, or does not properly parse to an integer, the default value of 720 hours or 30 days is used. If the default value is used due to a parse error, the node results in a warning. |
Max Size (MB) | Set the maximum amount of space on disk allowed for cache entries. When space is over the maximum, the most idle cache entries are removed until the space occupied meets or is less than the max size. |
Refresh | Set to true to take stale entries and re-run them to update the data. |
Refresh with Predicate |
Specify an expression for evaluation; if the result is true, refresh the cache entries. This option is useful if the criteria are more complex. The expression runs over a virtual table with the following columns:
You can write expressions that refer to these columns. For example, if user Bob likes his queries cached but only if they took more than a second: value("user") = "Bob" and value("time_to_generate") > 1 |
Remove with Predicate |
Specify an expression for evaluation; if the result is true, remove the cache entries. This option is useful if the criteria are more complex. The expression runs over a virtual table with the following columns:
You can write expressions that refer to these columns. For example, if you know that cache entries over a certain size are really mistakes (for example, the initial dive was not a good one): value("size") > 1024 * 1024 * 1024 and value("user") != "the boss" |
Sweep | Set to true to perform a full scan for stale cache entries and remove them. A stale cache entry is one that is no longer valid because the source data has changed. |
Email Object for failure |
Select a predefined mailing list to send an email to if the node fails. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Email Object for success |
Select a predefined mailing list to send an email to if the node succeeds. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Email Object for warning |
Select a predefined mailing list to send an email to if the node generates a warning. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Failure node | Select the next node upon failure. The pull-down list contains all nodes that are on the Task Flow. |
Success node | Select the next node upon successful completion. The next node automatically populates if a connecting line is set on the Task Flow. The pull-down list contains all nodes that are on the Task Flow. |
Working Directory |
Specifies the directory in which this node runs. If left blank, the Default Working Directory attribute that is set in the Start Control Node is used. When running a script, Production sets the working directory for the child process to the directory that contains the script, unless the node specifies a different directory. See Start Control Node. |
Default Working Directory |
Displays the Default Working Directory that is set the the Start Control Node. If a Default Working Directory is not specified, this attribute is blank. Applies to all nodes. See Start Control Node. |
External File Encoding |
Select the format for the node input files. If this attribute is blank, Workbench attempts to detect the type of encoding. This attribute is also used when saving log files. The encoding might need to be adjusted when using data with high bit Latin-1 characters or Unicode characters. |
Each node has an area where you can enter comments.
It is a DI best practice to enter a note for every node in a Production script. These notes can help you or a coworker understand the intent of the node and troubleshoot issues in the future.
Spectre Cache Refresh node with comments