dynamic_variables_file_only — dynamically update configuration directives from files only
If this pragma is set, it prevents opening of Interchange databases in search for dynamic content of the directives, so that only files are checked.
It only makes sense to use this in combination with the
dynamic_variables
pragma, and
DirConfig
and VariableDatabase
directives,
so check their reference pages for more information.
Example: Enable dynamic_variables_file_only pragma catalog-wide
Put the following in your catalog.cfg
:
Pragma dynamic_variables Pragma dynamic_variables_file_only
dynamic_variables_file_only is available in Interchange versions:
4.6.0-5.9.0 (git-head)
Interchange 5.9.0 (1/1 contexts shown):
Source: lib/Vend/Interpolate.pm
Line 578 (context shows lines 568-582 in dynamic_var():570)
} sub dynamic_var { my $varname = shift; return readfile($Vend::Cfg->{DirConfig}{Variable}{$varname}) if $Vend::Cfg->{DirConfig} and defined $Vend::Cfg->{DirConfig}{Variable}{$varname}; VARDB: { last VARDB if $::Pragma->{dynamic_variables_file_only}; last VARDB unless $Vend::Cfg->{VariableDatabase}; if($Vend::VarDatabase) { last VARDB unless $Vend::VarDatabase->record_exists($varname); return $Vend::VarDatabase->field($varname, 'Variable');