---+ 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.


%TOC%

---++ ClassMethod *new* <tt>($prefs,$type,$web,$topic,$prefix)</tt>

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* <tt>($web,$topic,$keyPrefix)</tt>

Loads preferences from a topic. All settings loaded are prefixed
with the key prefix (default '').



---++ ObjectMethod *insert* <tt>($type,$key,$val)</tt>
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* <tt>($html,\%shown) -> $text</tt>
Generate an (HTML if $html) representation of the content of this cache.


<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the Dev topic instead. -->
