Tags:
create new tag
, view all tags

Poor-man Cache

A simple way of caching plugin execution is shown in the PrologPlugin.

We use two tags:

  • XXX for normal execution at view time
  • SAVEXXX for caching at save time the execution

In commonTagsHandler:

  • we handle normally the %XXX{<args>}% tag
  • we visualize the cached value ( <result> ) stored in %SAVEXXX{<args> cachedvalue="<result>"}%
In beforeSaveHandler:
  • we transform the %XXX{<args>}% tag to %SAVEXXX{<args> cachedvalue="<result>"}%
In beforeEditHandler:
  • we transform back the %SAVEXXX{<args> cachedvalue="<result>"}% tag to the XXX{<args>} form for edit

-- AndreaSterbini - 21 Aug 2003

 
Topic revision: r2 - 2006-02-15 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.