Database template options
new TemplateDBOpts()
Template options for an IndexedDB-like back-end. See module:templeo/options.DBOptions for a full listing of options.
See also
- module:templeo/options.DBOptions
- module:templeo/options.Options
TemplateDBOpts.defaultOptions ⇒ Object
Returns
Object— The object described by TemplateOpts.defaultOptions
See also
- module:templeo/options.DBOptions
- module:templeo/options.Options
templeo/options.DBOptions
Template options for an IndexedDB-like back-end. All DB options inherit from [TemplateOpts]module:templeo/options.Options.
Type: module:templeo/options.Options
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| [dbTypeName='indexedDB'] | String | 'indexedDB' | The IndexedDB type to use. The default indexedDB value uses the global accessible instance that containsa property matching the type name. When not present in the current global scope, a module will be loaded using the provided type name. |
| [dbLocName='templeo'] | String | 'templeo' | Either the IDBDatabase.name that will beused or the location name/path passed into the IndexedDB-like module loaded via dbTypeName (e.g. LevelDB). |
| [renderTimePolicy=read-all-on-init-when-empty] | String | read-all-on-init-when-empty | The policy applied to partial template DB read operations when encounteringinclude directives that do not have template content present in cache storage during rendering. In addition to the policies defined inmodule:templeo/options.Options, the following policies can be applied: - read-all-on-init-when-empty When there are no partials registered during compilation other than the primary template designated byoptions.defaultTemplateName, all partial templates are read during the start of each rendering invocation. If partial templates are present/registered during compilation, no DB reads will be made during rendering. - read-all-on-init-when-empty-write Same as read-all-on-init-when-empty, but will also write compiled rendering functions when includedirectives are encountered during rendering. - read-write-and-close Like the read and read-write policy, partial templates are only read when include directives are encountered that do not already contain content.The DB will be opened before each read and closed after each read has completed for each included partial. |