.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "ELEKTRA\-CASCADING" "7" "2015-11-19" "" "" . .SH "NAME" \fBelektra\-cascading\fR \- of key names . .P \fBCascading\fR is the triggering of secondary actions\. For configuration it means that first the user configuration is read and if this attempt fails, the system configuration is used as fallback\. . .P The idea is that the application installs a configuration storage with default settings that can only be changed by the administrator\. But every user has the possibility to override parts of this \fIsystem configuration\fR regarding the user\'s needs in the *user configuration\. To sum up, besides system configuration, users have their own key databases that can override the settings according to their preferences\. . .P Thus when a key starts with \fB/\fR such cascading will automatically performed\. . .SH "SPEC" Keys in \fBspec\fR allow us to specify which keys are read by the application, which fallback it might have and which is the default value using meta data\. The implementation of these features happened in \fBksLookup\fR\. When cascading keys (those starting with \fB/\fR) are used following features are available (in the meta data of respective \fBspec\fR\-keys): . .IP "\(bu" 4 \fBoverride/#\fR: use these keys \fIin favour\fR of the key itself (note that \fB#\fR is the syntax for arrays, e\.g\. \fB#0\fR for the first element, \fB#_10\fR for the 11th and so on) . .IP "\(bu" 4 \fBnamespace/#\fR: instead of using all namespaces in the predefined order, one can specify which namespaces should be searched in which order . .IP "\(bu" 4 \fBfallback/#\fR: when no key was found in any of the (specified) namespaces the \fBfallback\fR\-keys will be searched . .IP "\(bu" 4 \fBdefault\fR: this value will be used if nothing else was found . .IP "" 0 . .SH "CASCADING" When cascading keys (those starting with \fB/\fR) the lookup will work in the following way (it can be debugged with \fBkdb get \-v\fR): . .P 1\.) In the \fBspec\fR\-key the \fBoverride/#\fR keys will be considered\. 2\.) If, in the \fBspec\fR\-key, a \fBnamespace/#\fR exist, those namespaces will be used\. 3\.) Otherwise, all namespaces will be considered, see here\. \fI/doc/help/elektra\-namespaces\.md\fR 4\.) In the \fBspec\fR\-key the \fBfallback/#\fR keys will be considered\. 5\.) In the \fBspec\fR\-key the \fBdefault\fR value will be returned\. . .P See application integration \fI/doc/tutorials/application\-integration\.md\fR for how to use cascading names in the context of applications\. . .P Read more about namespaces\. \fI/doc/help/elektra\-namespaces\.md\fR