Package TWiki::Prefs::PrefsCache
The
PrefsCache? package holds a cache of topics that have been read in, using
the
TopicPrefs? class. These functions manage that cache.
ClassMethod new ($prefs,$type,$web,$topic,$prefix)
Creates a new Prefs object.
-
$prefs - controlling TWiki::Prefs object -
$type - Type of prefs object to create, see notes. -
$web - web containing topic to load from (required is $topic is set) -
$topic - topic to load from -
$prefix - key prefix for all preferences (used for plugins)
If the specified topic is not found, returns an empty object.
ObjectMethod loadPrefsFromTopic ($web,$topic,$keyPrefix)
Loads preferences from a topic. All settings loaded are prefixed
with the key prefix (default '').
ObjectMethod insert ($type,$key,$val)
Adds a key-value pair of the given type to the object. Type is Set or Local.
Callback used for the Prefs::Parser object, or can be used to add
arbitrary new entries to a prefs cache.
Note that final preferences can't be set this way, they can only
be set in the context of a full topic read, because they cannot
be finalised until after the whole topic has been read.
ObjectMethod stringify ($html,\%shown) -> $text
Generate an (HTML if $html) representation of the content of this cache.