TIP PrefsCachePlugin is not installed on Foswiki.org.

PrefsCachePlugin

Cache preferences for faster access

Foswiki 1.1.0 and later only

By default Foswiki stores preferences, including access control settings, in topics. This means that every time the preferences for a topic are required - for example, when permissions are being check - it has to be opened and read. In a typical installation, then the number of topics that have to be read each time a Foswiki script (or REST request) is run can easily be in the hundreds, which can be a significant performance hit.

The PrefsCachePlugin uses a Berkeley DB to cache the preference settings read from topics, so the topics don't have to be repeatedly re-read.

BerkeleyDB is used because it is reasonably fast, and widely available. It would be easy for any reasonable programmer to change this to use a different database technology, if it is preferred. If you do this, please contribute your solution back to the community.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Run configure and set the {Store}{PrefsBackend} setting to Foswiki::Prefs::BerkeleyDBRAM. Visit InstalledPlugins to check that it is working.

Note that the plugin has no way to detect "offline" topic changes i.e. edits to topics that are made outside of Foswiki. If offline changes are made, the only way to repair the database is to delete it, and allow Foswiki to rebuild it. The database is stored in /working/PrefsCachePlugin under the root of your Foswiki installation, and can be safely deleted at any time.

Info

Author(s): Crawford Currie http://c-dot.co.uk
Copyright: © 2012-2014 Crawford Currie
License: GPL (Gnu General Public License)
Release: 8 May 2014
Version: 1.0
Change History:  
1.0 (26 Sep 2012) First version
Dependencies:
NameVersionDescription
BerkeleyDB>=0Required
Home page: http://foswiki.org/bin/view/Extensions/PrefsCachePlugin
Support: http://foswiki.org/bin/view/Support/PrefsCachePlugin

Topic revision: r1 - 08 May 2014, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy