Tags:
create new tag
, view all tags
ALERT! NOTE: This Plugin is replaced by the AttachContentPlugin

CacheContentPlugin

See AttachContentPlugin for the newly named version of this.

This plugin puts any text between a %STARTCACHE{"filename"}% and %ENDCACHE% into an attachment with the given filename.

The current version only refreshes the attachment when the topic is saved. Obviously this means that the attachment can get out of synch if, for example, it explicitly or implicitly refers to other topics.

I wrote this plugin specifically to be able to put my css into topic(s) and still be able to have efficient stylesheets: i.e., without the overhead of TWiki processing. There seem to be a number of other needs, however, and I'm happy to try and accomodate them!


Syntax Rules

Pretty simple. Just put in a %STARTCACHE{"filename"}% before content you want cached, and %ENDCACHE% after it, and the contents in between will be attached to the topic, for easy reference by other pages.

Examples

To come...

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %CACHECONTENTPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Caches portions of a topic in attachments to that topic

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Keep paragraph tags
    • Set KEEPPARS = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip CacheContentPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/CacheContentPlugin.txt Plugin topic
    data/TWiki/CacheContentPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/CacheContentPlugin.pm Plugin Perl module
  • Test if the installation was successful:
    • enter samples here

Plugin Info

Plugin Author: TWiki:Main.MeredithLesly
Plugin Version: 09 Feb 2006 (V1.000)
Change History:  
09 Feb 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
Benchmarks: GoodStyle nn%, FormattedSearch nn%, CacheContentPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/CacheContentPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/CacheContentPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/CacheContentPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main.MeredithLesly - 09 Feb 2006

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2007-04-09 - SteffenPoulsen
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.